Comments (11)
For those using express-openid-connect
, this worked for me (placed after the auth(config)
middleware based on @adamjmcgrath's solution above:
app.get("/signup", (req, res) => {
res.oidc.login({
returnTo: "/",
authorizationParams: { screen_hint: "signup" },
});
});
Key difference: using oidc
instead of openid
from express-openid-connect.
Hi,
If you're using the new universal login page you can use the screen_hint=signup
parameter:
https://auth0.com/docs/universal-login/new#signup
This can be passed through a custom parameter in authorizationParams
https://github.com/auth0/express-openid-connect/blob/master/API.md#authorization-params-key
Feel free to reopen if you need any more info
from express-openid-connect.
That worked perfect, thanks!
from express-openid-connect.
Awesome, that's working perfect, thanks!
from express-openid-connect.
Ok that worked great, but now /login always goes to sign-up how would I switch the setting based on route?
Example:
/login works like normal
/register sends applies the new authorizationParams and takes them to the signup flow.
from express-openid-connect.
This would probably work (looking at https://github.com/auth0/express-openid-connect/blob/master/lib/context.js#L62)
app.get('/register', (req, res) => {
res.openid.login({returnTo: '/', authorizationParams: { screen_hint: 'signup' } });
})
But beware dragons...
from express-openid-connect.
Actually it's in the api so you should be good:
https://github.com/auth0/express-openid-connect/blob/master/API.md#response
from express-openid-connect.
Only other thing I need to figure out is how to prefill the email address, is that possible?
from express-openid-connect.
For that you'd need to use the classic universal login (the new one doesn't support pre-filling the email)
In the authorizationParams
you'd pass: [email protected]
and mode=signUp
You'd also need to customize the classic login screen by adding some logic to handle the mode
param:
// retrieve screen mode from extra params if sent; default to 'login'
var mode = config.extraParams.mode || 'login';
...
var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
// add a selector for which screen to put up
initialScreen: mode,
...
});
from express-openid-connect.
The login_hint is working but I can't figure out where to customize the lock.
Which file do I find this code in?
var lock = new Auth0Lock(...
from express-openid-connect.
In your tenant dashboard: Universal Login > Login > Customize Login Page > Edit the default template
from express-openid-connect.
Related Issues (20)
- Question: How to set up swagger to work with express-openid-connect? HOT 7
- Question: `genid` function as async HOT 2
- Modify Config based on request headers. HOT 2
- Question: mitigate `checks.state argument is missing` error when messing with concurrent login. HOT 12
- Using express-openid-connect with express 5 HOT 1
- Auth flow doesn't complete when using AWS Lambda HOT 2
- Use of sync api HOT 1
- Incorrect forwarding with reverse proxy after callback HOT 5
- AggregateError: Issuer.discover() failed HOT 2
- the "originalUrl" is not used as the default "returnTo" url, the baseUrl is HOT 2
- ES6 Modules are not yet supported completely. HOT 1
- Timeout issues when calling `/oauth/token` and/or `.well-known/openid-configuration` HOT 4
- node crypto hkdfSync vs hkdf HOT 2
- Continue Signed In Functionality HOT 3
- code samples, an interface, or middleware for fastify (express is becoming legacy) HOT 1
- checks.state argument is missing HOT 2
- Allow logout_hint instead of id_token_hint HOT 3
- BadRequestError: checks.state argument is missing HOT 2
- Have a way to configure different domain for refreshing token and accessing login page HOT 1
- Deprecation warning (promisify) when upgrading to Node v21.6.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-openid-connect.