'Azure Function + OpenId Connect = 500 on callback
I have an azure function (nodejs) and through the Authentication tab, I'm adding an OpenID Connect identity provider. After filling in details, when hitting the function (hosting a web page, so I have redirect enabled), it take the user to the openid connect provider's login page, and upon signing on, they get redirected back to the azure function as expected:
https://[appname].azurewebsites.net/.auth/login/[provider-name]/callback?code=[code]&state=redir%3D%252F
However, at that point, it gets an HTTP 500 Internal Server Error. There's no details in logstream, or host logs as to what the error is. Logs also doesn't find any exceptions in the last 24 hours.
Is there something I'm missing? How can I start debugging this?
Solution 1:[1]
This might occur as described if there is a mistake / mismatch in specifying the client id or client secret in Azure. If you are getting this error, that's the first place I'd start -- double and triple check them.
https://docs.microsoft.com/en-us/azure/app-service/overview-authentication-authorization
https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-openid-connect
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ville |