Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-oauth2-pkce",
"version": "2.0.7",
"version": "2.0.8",
"description": "Authenticate against generic OAuth2 using PKCE",
"author": "Gardner Bickford <[email protected]>",
"license": "MIT",
Expand Down
4 changes: 4 additions & 0 deletions src/AuthService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ export class AuthService<TIDToken = JWTIDToken> {
method: 'POST',
body: toUrlEncoded(payload)
})
if (isRefresh && !response.ok) {
await this.logout()
await this.login()
}
this.removeItem('pkce')
let json = await response.json()
if (isRefresh && !json.refresh_token) {
Expand Down