Dynamic callbackURL
See original GitHub issueAt the moment I have to read the host from a configuration file since my application is sitting behind a reverse proxy and thus does not have the correct host set in the request.
passport.use('google:login', new GoogleStrategy({
clientID: <CLIENT_ID>,
clientSecret: <CLIENT_SECRET>,
callbackURL: host + '/auth/google/callback',
passReqToCallback: true
}, callback
)
)
Is there a way to have something that looks like this?
passport.authenticate('google:login', { callbackURL: domain + '/auth/google/callback' })
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
How do I set up a dynamic Allowed Callback URL?
Solution - Single Callback URL Using State · Pass the random value as the state parameter in the authentication request to Auth0. ·...
Read more >Dynamic Callback URL - Plugins - miniOrange
This feature allows you to specify a custom redirect URL. This URL will be sent to the server as the redirect URI parameter....
Read more >Solving for Dynamic OAuth 2.0 Callbacks with Environment ...
In this blog post, we will discuss the concept of Environment Handles and how they can be used to support dynamic OAuth.
Read more >jaredhanson/passport-google-oauth2 - dynamic callbackURL
Hi, Thank you for releasing an 'official' Google Oauth2 passport module. I am having some trouble trying to implement a dynamic callback URL...
Read more >Connected App with dynamic Callback URL in managed ...
While it is not possible to have dynamic callback URL in one single Conntected App, there are at least three different approaches how...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Alright. I figured it out. At least how it works for my setup. I am operating behind an nginx reverse proxy. I made the following two adjustments to get it to work.
proxy
as followsSo long…
Edit: Maybe someone could make a PR to document this option?
@jkhusanov you referring to nodejs server code? I extracted the host like this: