Skip to content

OpenID Connect Login - #3331

Closed
netpro2k wants to merge 5 commits into
masterfrom
oidc-spike
Closed

OpenID Connect Login#3331
netpro2k wants to merge 5 commits into
masterfrom
oidc-spike

Conversation

@netpro2k

@netpro2k netpro2k commented Nov 13, 2020

Copy link
Copy Markdown
Contributor

This adds support for signing in with OpenID Connect when the Hubs instance is configured to do so. most of the changes are on the backend in Hubs-Foundation/reticulum#426

At first shipping this will not yet be a "supported" feature as we still need to figure out edge cases, mostly around changing auth providers (you will end up with orphaned accounts, and can also easily lock yourself out of the admin interface).

The admin panel options are all marked as "internal" and so will be hidden unless the show_internal_configs query param is added to the admin panel. Additionally the server side configs are hidden behind another query param show_oidc_configs, so both should be set when configuring this.

┆Issue is synchronized with this Jira Task

@brianpeiris brianpeiris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor comments. Not sure how incomplete this draft is, so I'm happy to do another review later.

return getDescriptors(categorySchema).filter(
([path, descriptor]) =>
(qs.get("show_internal_configs") !== null || descriptor.internal !== "true") &&
(qs.get("show_oidc_configs") !== null || path[1] !== "oidc")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was it necessary to add another query param for this? Isn't internal_configs sufficient?

"sign-in.admin-no-permission": "You don't have access to admin tools. Sign into another account or ask an administrator to grant you permission.",
"sign-in.hub": "An account is required to join rooms.\n\nEnter your email to create your account or sign in.",
"sign-in.auth-started": "Email sent to {email}!\n\nTo continue, click on the link in the email using your phone, tablet, or PC.\n\nNo email? You may not be able to create an account.",
"sign-in.oidc-auth-started": "Waiting for signin...",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to use the sync_locales.js script to populate the other languages.

Comment thread src/utils/auth-channel.js
channel.on("auth_credentials", async ({ credentials: token, payload: payload }) => {
await this.handleAuthCredentials({ email: payload.email }, token);
resolve();
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to keep the previous order and register the handler before pushing the message.

Comment thread src/utils/auth-channel.js

const authComplete = new Promise(resolve =>
channel.on("auth_credentials", async ({ user_info, credentials: token }) => {
console.log("got credentials", user_info, token);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log?

Comment thread src/utils/auth-channel.js
async handleAuthCredentials(email, token, hubChannel) {
this.store.update({ credentials: { email, token } });
async handleAuthCredentials(userInfo, token, hubChannel) {
console.log("handleAuthCredentials", userInfo, token, hubChannel);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log

@misslivirose

Copy link
Copy Markdown
Contributor

We can revisit this prior to the May Hubs Cloud release and decide if we want to make any additional features part of the initial alpha/experimental release

@netpro2k

netpro2k commented Nov 1, 2022

Copy link
Copy Markdown
Contributor Author

Closing in favor of #5757

@netpro2k netpro2k closed this Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants