prime-8-consulting / meteor-oauth2

60 stars 20 forks source link

Get Refresh Token Working? #25

Open kcooools opened 7 years ago

kcooools commented 7 years ago

Hey, It seems the refresh token part is disabled in the example? Can someone help me get this working or show what's needed? Very confused, and hoping someone can assist me.

MichaelJCole commented 7 years ago

Hey @kcooools did you get this to work? I found this line to configure it, but haven't tested out the result. Curious for your experience. Thanks!

https://github.com/prime-8-consulting/meteor-oauth2/blob/f5cfc6e99d4e1ed96f3d627d860e037f998290cc/packages/meteor-oauth2-server/common.js#L30

rclai commented 6 years ago

The problem is this line of code, it needs to grant refresh_token as well. It needs to be added to that array.

rclai commented 6 years ago

In addition, you have to change this line of code too, and make sure that grantType === 'refresh_token' too (using an or-statement or w/e you want). Once you make those two changes the token refresh will work. I just confirmed.