Error message when reaching .../.auth/login/google?... : ClientId not found for 'google' provider #840
Labels
command: start
All issues related to the start command
os: windows
Issues happened on a Windows environment (not WSL).
priority: medium (P1)
Medium priority
scope: auth
Issues related to the authentication emulator
type: bug
Something isn't working
version: ga
Issues related to major/GA releases
Milestone
Are you accessing the CLI from the default port
:4280
?--port
) and accessing the CLI from that port:4280
ℹ️ NOTE: Make sure to enable debug logs when running any
swa
commands using--verbose=silly
Describe the bug
A clear and concise description of what the bug is.
1st try:
Reaching http://localhost:4280/.auth/login/google?post_login_redirect_uri=/useredit gives the error message on the page 'ClientId not found for 'google' provider'
staticwebapp.config.json:
"auth": {
"rolesSource": "/api/roles",
"identityProviders": {
"google": {
"registration": {
"clientIdSettingName": "GOOGLE_CLIENT_ID",
"clientSecretSettingName": "GOOGLE_CLIENT_SECRET"
}
}
}
}
2nd try:
If I remove this "google" config from my staticwebapp.config.json it works again (as expected)
3rd try:
Just for testing: reaching http://localhost:4280/.auth/login/gooooooogle?post_login_redirect_uri=/useredit works. I mean I'm not getting the error message ClientId not found for 'google' provider anymore and I'm reaching the Azure Static Web App Emulator as expected.
Tried to clear the cache of the browser + the Local storage + tried with another browser as well. Without luck.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
What is expected: after clicking on my 'Sign in with Google' button which target 'http://localhost:4280/.auth/login/google?post_login_redirect_uri=/useredit' I should be redirected to the Azure Static Web App Emulator - Authentication Portal page for the 'Google' provider where I can adjust some params like User ID, Username, User's roles and User's claims.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
It was working perfectly fine (for weeks) until today. AFAIK I didn't changed/updated anything on my machine. Same problem occurs with another projet. But no problem when deployed on AZURE. This problem is only occurring locally with the Azure SWA Emulator.
Below an extract of SWA found in my console:
Welcome to Azure Static Web Apps CLI (1.1.8)
Getting config file options from "swa-cli.config.json"...
Changed directory to C:\Users\t_lan\Documents\WORK\AZUR\PrologV5
Checking if localhost:4280 is accepting TCP connections...
Port 4280 is available. Use it.
Resolved port number: 4280
appDevserverUrl provided, we will try connect to dev server at .
[swa] Skipping Api because folder "C:\Users\t_lan\Documents\WORK\AZUR\PrologV5\http:\localhost:7238" is missing
Trying to read workflow config with values:
Detected dev server configuration
User workflow config:
Running echo 'No Data API found'. Skipping
Starting the SWA emulator with the following configuration:
[swa] - rolesSource: /api/roles
[swa] - identityProviders:
[swa] - google:
[swa] - registration:
[swa] - clientIdSettingName: GOOGLE_CLIENT_ID
[swa] - clientSecretSettingName: GOOGLE_CLIENT_SECRET
[swa] checking storage content
[swa] remote dev server detected.
[swa] - url: /service-worker.js
[swa] - target: http://localhost:5152
[swa] customUrl: false
[swa] is4xx: false
[swa] remote dev server detected. Proxying request
[swa] - url: /service-worker.js
[swa] - code: 200
[swa] GET http://localhost:5152/service-worker.js (proxy)
[swa] Connected to tcp:127.0.0.1:5152 successfully
[swa] http://localhost:5152 validated successfully
[swa] getting response from dev server
[swa] GET http://localhost:4280/service-worker.js - 304
[swa] Connected to tcp:localhost:5152 successfully
...
checking auth request
[swa] - auth request detected
[swa] processing auth request
[swa] - auth returned 404
[swa] GET http://localhost:4280/.auth/login/google?post_login_redirect_uri=/useredit - 404
The text was updated successfully, but these errors were encountered: