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

SSO support? #65

Open
nogweii opened this issue Apr 9, 2023 · 0 comments
Open

SSO support? #65

nogweii opened this issue Apr 9, 2023 · 0 comments
Labels
compatibility Compatibility with certain server version
Milestone

Comments

@nogweii
Copy link

nogweii commented Apr 9, 2023

0.12.0 was released with OAuth2 support. To make it work, I think you'll need to persist the OAuth 2 code and POST it to /api/auth/signin/sso. The JSON body needs 3 fields:

  • The ID of the identity server configuration, not sure how to get that
  • A redirect URI. Could this be a custom app URI, something like me.mudkip.moememos//sso-redirect? Or maybe use the memos.moe domain? That way, the app can register and handle the URI rather than opening the web browser.
  • The OAuth2 code. Many providers support passing it as a query string parameter so extracting it from that may be the path.

Looking into how the JS interacts with the SSO, it calls an API method /api/idp which is not authenticated to get the list of configured SSO providers. Included in the response is the ID which is needed before.

@mudkipme mudkipme added the compatibility Compatibility with certain server version label Apr 16, 2023
@mudkipme mudkipme added this to the 1.0 milestone Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with certain server version
Projects
None yet
Development

No branches or pull requests

2 participants