Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Static Webapps is not creating custom authentication #1038

Open
RomanPanaget opened this issue Jan 13, 2023 · 5 comments
Open

Azure Static Webapps is not creating custom authentication #1038

RomanPanaget opened this issue Jan 13, 2023 · 5 comments

Comments

@RomanPanaget
Copy link

Describe the bug

Some well-known configurations are not correctly picked up for auth proxy creation.
Cannot provide it publicly, only in private, but it is a Keycloak OIDC config.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy the Azure SWA with staticwebapp.config.json like this:
{
  "routes": [
    {
      "route": "/*",
      "headers": {
        "Cache-Control": "no-store"
      }
    }
  ],
  "auth": {
    "identityProviders": {
      "customOpenIdConnectProviders": {
        "keycloak": {
          "registration": {
            "clientIdSettingName": "KEYCLOAK_CLIENT_ID",
            "clientCredential": {
              "clientSecretSettingName": "KEYCLOAK_CLIENT_SECRET"
            },
            "openIdConnectConfiguration": {
              "wellKnownOpenIdConfiguration": "<private keycloak valid well-known URL>"
            }
          },
          "login": {
            "nameClaimType": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
            "scopes": ["openid", "profile", "email"],
            "loginParameterNames": []
          }
        }
      }
    }
  },
  "globalHeaders": {
    "Access-Control-Allow-Origin": "*",
    "Access-Control-Allow-Methods": "GET, POST, PUT"
  }
}

KEYCLOAK_CLIENT_ID and KEYCLOAK_CLIENT_SECRET are correctly set up in Application Settings.
3. Wait for deploy to finish
4. Navigate to .auth/login/keycloak and see a 404 code

Expected behavior
Expected to see at least a login page from my keycloak provider

Screenshots
From diagnostics:
Screenshot 2023-01-13 at 14 32 44

Additional context and possible hints
If I specify the separated auth, token, certs, issuer URLs, I can get a login page but the flows seems buggy and I can't get logged in in the end

I can provide my SWA URL, tenant and well-known URL for further details in DM

Thank you

@RomanPanaget
Copy link
Author

RomanPanaget commented Jan 13, 2023

@mkarmark is there any logs on your side we can check together during the deployment ? Please reach out to me

@eferfolja
Copy link

eferfolja commented Jan 27, 2023

Having the same issue as described above on two SWA using Custom Auth. One uses Azure B2C, the other one uses a custom config for Google. Both apps were working for months.

@4ux-nbIx
Copy link

4ux-nbIx commented May 5, 2023

Any update on this? I'm facing the same issue... And today I can't even deploy a new Static Web App via anything!!! Getting 500 in both Azure Portal and az-cli :(

@manoj271106
Copy link

same error here , azure b2c auth integration doesn't seem to be working, I get a 401 error once the flow redirects or the callback happens.

@vtapadia
Copy link

Probably a very old issue, but I also did the configuration and getting the same 404 error.

Any pointers on what is wrong here... :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants