Azure / Azure/static-web-apps

Custom Authentication Issue

Open
#1,364 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When I change authentication from the AAD and GitHub to Google, then clicking login link is looped back to fallback route/homepage.

**To Reproduce**
1. Authentication setup with AAD/GitHub works as expected: https://brave-bay-02c113210.4.azurestaticapps.net/
2. Add google as an authentication provider in staticwebapp.config.json:
`"auth": {
"identityProviders": {
"google": {
"registration": {
"clientIdSettingName": "GOOGLE_CLIENT_ID",
"clientSecretSettingName": "GOOGLE_CLIENT_SECRET"
}
}
}
}`
4. Create the application settings which contain client id and client secret
5. Now attempts to access /.auth/login/google just loops back to home page
6. Try to access /.auth/me and the endpoint also loops back to home page
7. https://brave-bay-02c113210-4.centralus.4.azurestaticapps.net/ <- here is my swa with the google settings

**Expected behavior**
A clear and concise description of what you expected to happen.
![image](https://github.com/Azure/static-web-apps/assets/134530217/47709e94-379c-4d57-a640-7470d3be4966)

**Screenshots**
![image](https://github.com/Azure/static-web-apps/assets/134530217/f780783f-dbb8-4aa2-ba8d-e216782eca18)

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.