-
Notifications
You must be signed in to change notification settings - Fork 139
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
feat(showcase): add conditional rendering for login page #602
Conversation
🦋 Changeset detectedLatest commit: 80d6a79 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Tried testing it with gitlab and got the following error: It appears we also need to configure the auth provider integrations in the https://backstage.io/docs/auth/identity-resolver/ Managed to login with gitlab once I configured the auth provider for gitlab. providerFactories: {
...defaultAuthProviderFactories,
gitlab: providers.gitlab.create({
signIn: {
async resolver({ result: { fullProfile } }, ctx) {
const userId = fullProfile.username;
if (!userId) {
throw new Error(
`GitLab user profile does not contain a username`,
);
}
// Creates an entity
const userEntity = stringifyEntityRef({
kind: 'User',
name: userId,
namespace: DEFAULT_NAMESPACE,
});
const { entity } = await ctx.findCatalogUser({
entityRef: userEntity,
});
const ownership = getDefaultOwnershipEntityRefs(entity);
return ctx.issueToken({
claims: {
sub: userEntity,
ent: ownership,
},
});
},
},
}),
... |
@Zaperex this PR does not cover the entity mapping so this is to be expected. |
Signed-off-by: Paul Schultz <pschultz@pobox.com>
5db79bd
to
2f81cce
Compare
Signed-off-by: Paul Schultz <pschultz@pobox.com>
…into conditional-login-page
Signed-off-by: Paul Schultz <pschultz@pobox.com>
The image is available at: |
…into conditional-login-page
Signed-off-by: Paul Schultz <pschultz@pobox.com>
The image is available at: |
The image is available at: |
The image is available at: |
The image is available at: |
Blocked by backstage/backstage#20877 |
…into conditional-login-page Signed-off-by: Paul Schultz <pschultz@pobox.com>
…/backstage-showcase into conditional-login-page
The image is available at: |
The image is available at: |
Signed-off-by: Paul Schultz <pschultz@pobox.com>
The image is available at: |
The image is available at: |
Signed-off-by: Paul Schultz <pschultz@pobox.com>
The image is available at: |
The image is available at: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor question but otherwise looks good
- OneLogin - `onelogin` | ||
- SAML - `saml` | ||
|
||
- Add the corresponding authentication provider key as the value to `signInPage` in your `app-config`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include something along the lines of 'To disabled the Guest login set auth.environment
to production
'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this brings me to the question, what if someone wants to enable guest in production environment? Is that possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgmt
I have a few questions regarding functionality for example, how one enable guest login if the environment is production
or what if someone needs multiple auth providers in sign-in page.
But neither of these is blocking.
Yeah I was debating the same thing. My conclusion was that companies typically only have one sign in option, if this is not the case we can easily change this. However, there is an issue where the proxy sign in can only have ONE option. I have also yet to find a case where logging in is not required for a company. |
…into conditional-login-page
Signed-off-by: Paul Schultz <pschultz@pobox.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The image is available at: |
Kudos, SonarCloud Quality Gate passed!
|
The image is available at: |
Description
Please explain the changes you made here.
Which issue(s) does this PR fix
ConfigReader
incorrectly readsfallback
backstage/backstage#20877PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer