Open emily-foraged opened 10 months ago
I am not sure but open to investigation in order to see if we could do it.
Hey @adrien2p! I think I found a way to do this! I think we'd just need to replace the call to passport.authenticate on L79 in auth-routes-builder.ts with something like:
(req, res, next) => {
const { screen_hint } = req.query;
const authenticate = passport.authenticate(strategyName, {
...passportAuthenticateMiddlewareOptions,
session: false,
screen_hint: screen_hint === 'signup' ? 'signup' : '',
});
authenticate(req, res, next);
}
I tried to push a branch to repo to open a PR but it seems to be stalling. I fond the contribution instructions but am not totally sure what they're asking of me - should I be forking the repo and opening a PR against the fork?
Sounds super cool, yes you need to and open a pr 👍
Is there a way to have medusa-plugin-auth/Passport conditionally redirect users to the Auth0 sign up page rather than to the login page? It looks like if you pass
?screen_hint=signup
to the Auth0/authorize
endpoint, users will be routed to the signup page (source). Unsure if there's a way to configure that query parameter within our Medusa app and pass it all the way through to the actual Auth0 url right now though.