nickshine/lambda-edge-azure-auth

Infinite loop

Opened this issue · 3 comments

Hi @nickshine

I was able to build code and deploy it successfully but when I try to authenticate, I am getting stuck in an infinite loop.

After sometime the browser throws an error. I am not sure if I am doing something wrong. Can you please help?

Hi @nickshine,

I was able to fix this issue by appending the redirect URI with /_callback but now I am getting Internal server error on a black screen. Can you please guide me to fix this?

@jayeshbino It's been a while since I looked at this. Can you tell from the dev tools network tab which part of the auth flow it is getting hung up on?

Auth
Hi @nickshine I have attached the network screenshot where I am getting the 500 error. I was able to successfully login to Azure AD(checked the audit logs in AD) and once I have logged in I am getting the error. Please find my below config.json

{
"AUTH_REQUEST": {
"client_id": "",
"redirect_uri": "https://mydomain.cloudfront.net/_callback",
"response_type": "code",
"response_mode": "query",
"scope": "openid email profile"
},
"TOKEN_REQUEST": {
"client_id": "
",
"grant_type": "authorization_code",
"redirect_uri": "https://mydomain.cloudfront.net/_callback",
"client_secret": ""
},
"DISTRIBUTION": "default-ad",
"TRAILING_SLASH_REDIRECTS_ENABLED": true,
"SIMPLE_URLS_ENABLED": true,
"PRIVATE_KEY": "-----BEGIN RSA PRIVATE KEY-----\n
\n-----END RSA PRIVATE KEY-----\n",
"PUBLIC_KEY": "-----BEGIN PUBLIC KEY-----\n*********\n-----END PUBLIC KEY-----\n",
"TENANT": "*********",
"DISCOVERY_DOCUMENT": "https://login.microsoftonline.com/*********/v2.0/.well-known/openid-configuration",
"SESSION_DURATION": 12960000,
"CALLBACK_PATH": "/_callback"
}