Skip to content
successfulAuthentication()
This function returns the user metadata along with the JWT token used to authenticate. It can be used to implement alternative signing in methods such as OAuth as ilustrated by these examples:
Example
typescript
const { error, result: user } = await authenticate(payload)
if( error ) {
return Result.error(error)
}
return Result.result(successfulAuthentication(user, context))