File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/core/src/lib/actions/callback Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -201,10 +201,10 @@ export async function callback(
201201 const paramToken = query ?. token as string | undefined
202202 const paramIdentifier = query ?. email as string | undefined
203203
204- if ( ! paramToken || ! paramIdentifier ) {
204+ if ( ! paramToken ) {
205205 const e = new TypeError (
206- "Missing token or email . The sign-in URL was manually opened without token/identifier or the link was not sent correctly in the email." ,
207- { cause : { hasToken : ! ! paramToken , hasEmail : ! ! paramIdentifier } }
206+ "Missing token. The sign-in URL was manually opened without token or the link was not sent correctly in the email." ,
207+ { cause : { hasToken : ! ! paramToken } }
208208 )
209209 e . name = "Configuration"
210210 throw e
@@ -213,7 +213,8 @@ export async function callback(
213213 const secret = provider . secret ?? options . secret
214214 // @ts -expect-error -- Verified in `assertConfig`.
215215 const invite = await adapter . useVerificationToken ( {
216- identifier : paramIdentifier , // TODO: Drop this requirement for lookup
216+ // @ts -expect-error User-land adapters might decide to omit the identifier during lookup
217+ identifier : paramIdentifier , // TODO: Drop this requirement for lookup in official adapters too
217218 token : await createHash ( `${ paramToken } ${ secret } ` ) ,
218219 } )
219220
You can’t perform that action at this time.
0 commit comments