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

TS String Enum for Stytch Token Type #323

Open
grant opened this issue Jul 16, 2024 · 2 comments
Open

TS String Enum for Stytch Token Type #323

grant opened this issue Jul 16, 2024 · 2 comments

Comments

@grant
Copy link

grant commented Jul 16, 2024

I'd like to have a TS constant and a union type. Something like:

import {StytchToken, StytchTokenType} from "stytch";

const MAGIC_LINKS_TOKEN: StytchTokenType = StytchToken.Magic_Links; // "magic_links";

Docs:

https://stytch.com/docs/guides/dashboard/redirect-urls#structure

I don't want to use the "magic_links" string.

@chris-stytch
Copy link
Contributor

Heya @grant! Thanks for the feedback.

You can see how we handled this in one of our Next.js example apps here: https://github.com/stytchauth/stytch-nextjs-integration/blob/main/pages/authenticate.tsx#L5-L24

Our app using consts there does align with the theme of your feedback here as well. I'll chat with our SDK team about this!

@grant
Copy link
Author

grant commented Jul 24, 2024

Sweet, sounds good @chris-stytch . Will hardcode these for now.

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

No branches or pull requests

2 participants