Support SSO login in the SDK #19723
Replies: 6 comments 5 replies
-
I think this is an interesting feature request. |
Beta Was this translation helpful? Give feedback.
-
I think we'll have to keep the difference between provider types in mind. LDAP logins will not be the same redirect flow as openid/oauth2. Maybe we should have a |
Beta Was this translation helpful? Give feedback.
-
Isn't that a must have feature for every project that has separate FE and Directus as BE? |
Beta Was this translation helpful? Give feedback.
-
This is something we wish for around 1,5-2 years. Please |
Beta Was this translation helpful? Give feedback.
-
I was able to implement that by making directus sso to redirect back to FE app. const redirect = `${window.location.origin}${'/'}`;
await navigateTo(`http://${DIRECTUS_BE}/auth/login/${PROVIDER}?redirect=${encodeURIComponent(redirect)}`, { external: true }); That sets the refresh token to your cookies, so |
Beta Was this translation helpful? Give feedback.
-
Please also think about supporting SSO withing native apps. |
Beta Was this translation helpful? Give feedback.
-
Summary
Logging in with external providers requires opening an URL in the current or a new tab then be redirected to an external service and be directed back to the app authenticating.
Since the SDK uses AJAX requests this redirection flow is not currently supported.
Basic Example
Something along the lines of
Motivation
SSO is a good and broadly used alternative to user/password logins.
Detailed Design
I am not sure about the detailed design or final flow. TBD
Requirements List
Must Have:
Drawbacks
Alternatives
Alternatively we could not support SSO like the current and old SDK
Adoption Strategy
As new new feature without breaking change this would not require additional adoption for existing codebases.
Unresolved Questions
Beta Was this translation helpful? Give feedback.
All reactions