bpedroza / js-pkce

A package that makes using the OAuth2 PKCE flow easier
MIT License
31 stars 12 forks source link

Improvement: Add ability to refresh an access token #39

Closed TheBerg closed 1 year ago

TheBerg commented 1 year ago

Some servers requires the client to refresh their access token periodically. This adds that functionality to this library.

bpedroza commented 1 year ago

Thanks for your contribution. The code looks good. Please just update the copy/pasted method description.

I'm also not sure if allowing additional post parameters might be needed in some use cases, but we can always add that later if people ask for it.

TheBerg commented 1 year ago

@bpedroza Thanks! Updated.

I had updated it earlier, but spilled water on my laptop and lost that original branch. 🤪😱🤣

bpedroza commented 1 year ago

Looks good. Thank you again. I'll get a new release out Today or tomorrow.

TheBerg commented 1 year ago

Thank you so much! You rock!!!

On Tue, Aug 22, 2023 at 2:41 PM Bryan @.***> wrote:

Looks good. Thank you again. I'll get a new release out Today or tomorrow.

— Reply to this email directly, view it on GitHub https://github.com/bpedroza/js-pkce/pull/39#issuecomment-1688968539, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACN2Z43K4ZSKK625YPJHDTXWURO7ANCNFSM6AAAAAA3YZUIGY . You are receiving this because you authored the thread.Message ID: @.***>

bpedroza commented 1 year ago

I just realized the access token is not required for exchanging a refresh token. Is there a reason you included it here?

TheBerg commented 1 year ago

I'm dumb and thought you needed it. I will PR to remove that.

On Tue, Aug 22, 2023 at 3:16 PM Bryan @.***> wrote:

I just realized the access token is not required for exchanging a refresh token. Is there a reason you included it here?

— Reply to this email directly, view it on GitHub https://github.com/bpedroza/js-pkce/pull/39#issuecomment-1688999651, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACN2Z5ZIULPJVYIUYP73KLXWUVT7ANCNFSM6AAAAAA3YZUIGY . You are receiving this because you authored the thread.Message ID: @.***>

bpedroza commented 1 year ago

It's OK. I'm working on it now. You left a few things in the tests too. Just double checking before I removed it.