Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh token not received and other problems #93

Open
typhoon11 opened this issue May 10, 2023 · 5 comments
Open

Refresh token not received and other problems #93

typhoon11 opened this issue May 10, 2023 · 5 comments

Comments

@typhoon11
Copy link

When trying to console log the refresh token it returns undefinied tried all the steps in previous issues like adding constent and then access_type offline. Also how to add the expires_in field so that I can change the default expiry time

@nabeel054002
Copy link

its accessType not access_type

@Daidalos117
Copy link

Daidalos117 commented Aug 1, 2023

Did somebody solve it? Typescript doesn't now any accessType property...

@nabeel054002
Copy link

Could you please send a screenshot of the typescript code used for the passport oauth, would be helpful, thanks.

@timothyliu
Copy link

There is work arround: #4 (comment)

@rsahukrishworks
Copy link

i am able to get the refresh token

the refresh token is showing invalid when in try to get id_token from google apis using the refresh token

passport.use(new GoogleStarategy({
    clientID: process.env.GOOGLE_AUTH_CLIENTID,
    clientSecret: process.env.GOOGLE_AUTH_CLIENT_SECRET,
    callbackURL: uris.GOOGLE_CALLBACK_URL,
    passReqToCallback: true
}, async (req,accessToken, refreshToken, params, profile, cb) => {
    return cb(null, result)
}));

authRoutes.route('/login/google').get(passport.authenticate('google', { 
    scope: [" https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/userinfo.email"],
    approvalPrompt: 
    'force',accessType: 'offline'}));

the refresh token i have

{
  refreshToken: '1//0gdDoOs3m76H4CgYIARAAGBASNwF-L9Ireg13JT11xNWBNd1OLif5FAks9o36qZ50JSqCpBBIL7mOqk4btwgoqRa7mBmMtPrTAFQ'
}

how to get the id_token using refresh token after token expiry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants