The class documentation tells the default value for sessionMagicLinkKey uses camelCase.
/**
* The key on the session to store the magic link.
* @default "auth:magicLink"
*/
sessionMagicLinkKey?: string
The code examples in the README use lowercase.
// This session key `auth:magiclink` is the default one used by the EmailLinkStrategy
// you can customize it passing a `sessionMagicLinkKey` when creating an
// instance.
return json({
magicLinkSent: session.has('auth:magiclink'),
magicLinkEmail: session.get('auth:email'),
})
So, I suppose either the docs or the default value should be corrected.
Otherwise some people may have quite a bit of fun debugging their auth code, trying to figure out why the link is not there.
Describe the bug
The class documentation tells the default value for
sessionMagicLinkKey
uses camelCase.The code examples in the README use lowercase.
Here we can see, that lowercase is the right way to go if you want make things work. https://github.com/pbteja1998/remix-auth-email-link/blob/main/src/index.ts#L173
So, I suppose either the docs or the default value should be corrected.
Otherwise some people may have quite a bit of fun debugging their auth code, trying to figure out why the link is not there.
Your Example Website or App
Does not really need stackblitz
Steps to Reproduce the Bug or Issue
Expected behavior
Screenshots or Videos
No response
Platform
Additional context
No response