Shopify remix app with custom serverless backend

Basically i am building the shopify app , which created using the shopify cli in remix template, and i want to use the custom backend for my app which is built using aws lambdas, so i want to know the flow of authentication and getting access token at my backend, and how can i call my backend via the session token. so can anyone help me regarding this?