NodeJs / Express screen_hint = signup help

Hi Auth0, I’ve read most everything you can both on Auth0 site, other forum posts and github. I tried a good part of yesterday to have my signup button redirect to the signup page instead of login but still haven’t gotten it.

I followed and have the login page working well from the NodeJS quick start:


const { auth } = require('express-openid-connect');

const config = {
  authRequired: false,
  auth0Logout: true,
  secret: 'a long, randomly-generated string stored in env',
  baseURL: 'http://localhost:3000',
  issuerBaseURL: ''

// auth router attaches /login, /logout, and /callback routes to the baseURL

// req.isAuthenticated is provided from the auth router
app.get('/', (req, res) => {
  res.send(req.oidc.isAuthenticated() ? 'Logged in' : 'Logged out');

Now here are the problem children:

Frontend using react to call API:
<div class="dropdown-menu">
                            <a href = 'http://localhost:8080/signup' >
                            <span>Sign up</span>
                            <a href = 'http://localhost:8080/signin' >
                            <span>Sign in</span>

Corresponding backend:
 app.get('/signin',  (req, res) => {
    var user = JSON.stringify(req.oidc.user.nickname);
   res.send(req.oidc.isAuthenticated() ? res.redirect(`http://localhost:3000/${user}`) : console.log('Logged out')) ;

 app.get('/signup', (req, res) => { 
    var user = JSON.stringify(req.oidc.user.nickname);
    extraOptions: {
      screen_hint: 'signup',
  }) ? res.redirect(`http://localhost:3000/${user}`) : console.log('Logged out')) ;

Both sign in and signup ‘get’ calls redirect to the login page, and I have tried countless permutations of screen_hint = signup (including things like ‘screen_hint’ : ‘signup’ and countless other similar tries). I see this is a parameter, and in my provided backend code you can see what I ended with, but I tried putting this parameter in the config section, and also as otherParameters, Parameters, params instead of extraOptions which was my last try before seeking additional help.

Thank you guys, I spent a long while on this and was hoping you’d be able to help ASAP

This guide solved my issue, I tried using it early on but for one reason or the other didn’t get the result I wanted :c

Here is the basic example that fixed things for me:

app.get('/signup', (req, res) => {
      authorizationParams: {
        screen_hint: 'signup',

also in my config changed authRequired from True to False and then use authrequired as needed for different routes