You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use-case where my datasource / service instance lives on the Remix AppContext object and is not available when the auth strategy gets initialized.
I would like to be able to pass in some additional parameters from the action/loader when I call auth.authenticate() and then make those parameters available on the verify function call
The text was updated successfully, but these errors were encountered:
sergiodxa
changed the title
support passing additional information to the Strategy for use during Verify
Support passing additional information to the Strategy for use during Verify
Oct 28, 2021
It has been a long time, but I just merged #113 which let strategies receive the context as an option from the authenticate method, so you can do:
exportletaction: ActionFunction=async({ request, context })=>{returnawaitauthenticator.authenticate("strategy",request,{
context,// this is newsuccessRedirect: "/",failureRedirect: "/login"})}
Right now, it's up to the strategy to use or not this context or make it available in the verify callback, but it should be possible to create a strategy using it yourself.
I have a use-case where my datasource / service instance lives on the Remix AppContext object and is not available when the auth strategy gets initialized.
I would like to be able to pass in some additional parameters from the action/loader when I call
auth.authenticate()
and then make those parameters available on theverify
function callThe text was updated successfully, but these errors were encountered: