500 response code after authentication with custom IdP(/ 500 in the login callback)
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Hi ,
I am trying to use azure static web apps for hosting my static content. I really liked the feature wherein we can use custom Idp which matches our absolute requirement. I followed the [documentation ](https://docs.microsoft.com/en-us/azure/static-web-apps/authentication-custom?tabs=aad#configure-a-custom-openid-connect-provider) to configure our custom IdP.
So, while logging in I indeed gets redirected to our custom login page but after login we get a 500 in the callback redirect.
For security reasons I cannot share the details of our IdP but below are the screenshots which explains the issue. I would appreciate if we can get some help in finding the issue.
Note: when I use same custom config file(staticwebapp.config.json) by pointing to Azure AAD (definitely with clientId/secret and openIdCOnfig of AAD), the login was succesfull.
Below are the screenshot explains the flow .
1. Screenshot depicting complete flow (session is active for the user )

2. Successful authresp and we can see code has been returned :

3. 500 for the callback request

Any help for debugging the issue would be great. Please let me know if I need to provide any more information.
PS :
a) The current application does not have any function so I cannot use Application insights.
b) Also I tried with other sample application as well which has a function, but application insights for that application was also not helpful.
c) I also tried checking kudu console at https://sitename.scm.azurewebsites.net but I got 404 for that. Not sure if I need to do anything to enable kudu console.
d) I am using Standard hosting plan
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.