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

Support theme while redirecting user to authorization URL #1129

Open
sagar7993 opened this issue Sep 16, 2024 · 2 comments
Open

Support theme while redirecting user to authorization URL #1129

sagar7993 opened this issue Sep 16, 2024 · 2 comments

Comments

@sagar7993
Copy link

Can we allow support for rendering theme while creating the authorization URL? Right now I have to manually set it as light/dark in the WorkOS dashboard. But I would love to have the capability to set the theme while constructing the authorization URL. Here's what I am proposing

const authorizationUrl = workos.userManagement.getAuthorizationUrl({
    provider: 'authkit',
    screenHint: 'sign-in',
    redirectUri: `<REDIRECT_URL>`,
    clientId: <WORKOS_CLIENT_ID>,
    state: redirectUrl,
    // Add new option called `theme`
    theme: 'dark' // Possible values are `light` or `dark` or `system` or `undefined`
});
redirect(authorizationUrl);

This will allow me to keep my login page in sync with the user's theme choice on my own dashboard. If user has selected dark mode on my dashboard, I would like to be able to send them to a dark themed login page.

@PaulAsjes
Copy link
Contributor

Hi @sagar7993! Thanks for the feedback, seems like a useful feature. I've let the team know and I'll update this issue once I have more info.

@sagar7993
Copy link
Author

@PaulAsjes thanks for your prompt response, much appreciated. 👏🏼
Do let me know whenever this feature is launched. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants