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
🐛 Bug Report: Backstage Github auth is not working. #24685
Comments
Do you need to set a profile.email? Like so
Maybe this helps |
Even after modifying this still the same issue. Can you helps me with further investigation. Due to this we are unable to proceed further implimentation |
please remove the first 2 resolvers and keep only
you need to pick the resolver that makes sense for your use case as described in https://backstage.io/docs/auth/github/provider/#configuration. Since the resolvers are used in order, I've opened #24726. I hope it clarifies things. |
The problem appears when a GitHub don't have configured the public email in his profile and his emails are marked as "Keep my email addresses private". To solve that the user need:
Probably exists a different method con configure Backstage to match the private emails. |
This error also occurs when you don't have the User kind populated in the catalog. Don't forget add the githubOrg (Groups, Users) provider additional to the github provider (Repositories). To avoid the undefined email problem with users with private addresses, invert the resolver evaluation to match the username first and the email after in the resolvers:
- resolver: usernameMatchingUserEntityName
- resolver: emailMatchingUserEntityProfileEmail
- resolver: emailLocalPartMatchingUserEntityName |
📜 Description
We have installed backstage 1.24.0 with minimal plugin installation, We are trying to configure github authentication using githubapp as well github Oauth. But we are getting Login failed, user profile does not contain an email.
As part of troubleshooting we have followed this PR issue raised #23748 and updated the below files
Update app-config.yaml
Update packages/app/src/App.tsx
Update packages/backend/src/index.ts
Update examples/org.yaml to change "guest" to my GH username
App.tsx
app-config.yml
org.yml
👍 Expected behavior
Login failed, user profile does not contain an email
👎 Actual Behavior with Screenshots
👟 Reproduction steps
settings->Authentication Providers -> choose GitHub->sign in
📃 Provide the context for the Bug.
No response
🖥️ Your Environment
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: