Open lamlejobchat opened 3 years ago
This is the closest solution I found: https://github.com/jaredhanson/passport/issues/50 . Seems to be working for me.
You must make sure that wherever you call authenticate
or use
functions you reference your custom strategy name. I encapsulated my strategies in a class with a strategy property to be able to call passport.authenticate(this.strategy, ....)
and keep this nice and consistent
How to add multiple callback config with same cliendId?
I have some code:
I want to register two instance 'GoogleStrategy' with two 'callbackURL' use for web and desktop app:
With each platform will have difference url for request authenticate:
We register callback from Google with each type 'google-web' and 'google-desktop':
But this code really not working because inside
Strategy
constructor, 'name' alway equal 'google'. I think I will custom 'name' is a input in Strategy constructor. Does that will destabilize the passport and not working?