Skip to content

Commit

Permalink
Make state not a getter
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjstevens committed Oct 27, 2022
1 parent 17079b7 commit 3bab368
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/authentication/src/OAuthModel/model.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ const stateModelFactory = (configSchema: OAuthInternetAccountConfigModel) => {
},
/**
* OAuth state parameter: https://www.rfc-editor.org/rfc/rfc6749#section-4.1.1
* Can override this getter if dynamic state is needed.
* Can override or extend if dynamic state is needed.
*/
get state(): string | undefined {
state(): string | undefined {
return getConf(self, 'state') || undefined
},
get responseType(): 'token' | 'code' {
Expand Down Expand Up @@ -264,8 +264,8 @@ const stateModelFactory = (configSchema: OAuthInternetAccountConfigModel) => {
response_type: self.responseType || 'code',
}

if (self.state) {
data.state = self.state
if (self.state()) {
data.state = self.state()
}

if (self.scopes) {
Expand Down

0 comments on commit 3bab368

Please sign in to comment.