Azure / Azure/static-web-apps

500 response code after authentication with custom IdP(/ 500 in the login callback)

Open
#547 12 comments 0 reactions 0 assignees View on GitHub
documentation
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 )

![image](https://user-images.githubusercontent.com/63940739/129316891-a17902cd-7ec3-4a27-98c3-0ffc61b91380.png)

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

![image](https://user-images.githubusercontent.com/63940739/129317453-a0fc8c80-994a-4f7c-8cf9-9ed383cf1f35.png)

3. 500 for the callback request
![image](https://user-images.githubusercontent.com/63940739/129317853-2d5b1ef7-21b1-46fe-90de-d5a7a4b9527a.png)

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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.