Azure AD B2C authentication and change password policy
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
I have used the guide [available here](https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-in-azure-static-app) to setup authentication using Azure AD B2C for my static webapp.
It's all working great. I can login by sending users to `/.auth/login/aadb2c` and the redirect back to the site works fine.
But I have been struggling to implement a change password policy. I can't find a built-in endpoint for that (like `/.auth/changepassword/aadb2c` or similar), and looking at the response from wellKnownOpenIdConfiguration, I can't see how it should know the correct url for the password change policy.
But when I try to redirect te user myself to this url (have tried many variations without luck):
`https://{myCustomDoman}/{myTenantId}/B2C_1A_PROFILEEDIT_PASSWORDCHANGE/oauth2/v2.0/authorize?client_id={myClientId}&nonce=defaultNonce&redirect_uri={mySiteFQDN}%2F.auth%2Flogin%2Faadb2c%2Fcallback&scope=openid+profile&post_login_redirect_uri=%2F.auth%2Fcomplete&response_type=code`
The change password experience works fine, but with the callback, I end up with a status 401 .
I have examined the response from the login (which uses the built-in endpoint) and the change password requests, and there are noticeable differences.
How should I proceed to get the change password flow integrated into my SWA?
BR David
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.