Merge pull request #11104 from backstage/freben/less-true-than-before

most of these casts are apparently no longer necessary
This commit is contained in:
Fredrik Adelöw
2022-04-27 15:40:11 +02:00
committed by GitHub
9 changed files with 10 additions and 12 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ export class ProviderAAuthProvider implements OAuthProviderHandlers {
clientID: options.clientId,
clientSecret: options.clientSecret,
callbackURL: options.callbackUrl,
passReqToCallback: false as true,
passReqToCallback: false,
response_type: 'code',
/// ... etc
}
@@ -71,6 +71,8 @@ export class Auth0AuthProvider implements OAuthHandlers {
clientSecret: options.clientSecret,
callbackURL: options.callbackUrl,
domain: options.domain,
// We need passReqToCallback set to false to get params, but there's
// no matching type signature for that, so instead behold this beauty
passReqToCallback: false as true,
},
(
@@ -94,9 +94,7 @@ export class BitbucketAuthProvider implements OAuthHandlers {
clientID: options.clientId,
clientSecret: options.clientSecret,
callbackURL: options.callbackUrl,
// We need passReqToCallback set to false to get params, but there's
// no matching type signature for that, so instead behold this beauty
passReqToCallback: false as true,
passReqToCallback: false,
},
(
accessToken: any,
@@ -73,9 +73,7 @@ export class GoogleAuthProvider implements OAuthHandlers {
clientID: options.clientId,
clientSecret: options.clientSecret,
callbackURL: options.callbackUrl,
// We need passReqToCallback set to false to get params, but there's
// no matching type signature for that, so instead behold this beauty
passReqToCallback: false as true,
passReqToCallback: false,
},
(
accessToken: any,
@@ -83,7 +83,7 @@ export class MicrosoftAuthProvider implements OAuthHandlers {
callbackURL: options.callbackUrl,
authorizationURL: options.authorizationUrl,
tokenURL: options.tokenUrl,
passReqToCallback: false as true,
passReqToCallback: false,
},
(
accessToken: any,
@@ -76,7 +76,7 @@ export class OAuth2AuthProvider implements OAuthHandlers {
callbackURL: options.callbackUrl,
authorizationURL: options.authorizationUrl,
tokenURL: options.tokenUrl,
passReqToCallback: false as true,
passReqToCallback: false,
scope: options.scope,
customHeaders: options.includeBasicAuth
? {
@@ -146,7 +146,7 @@ export class OidcAuthProvider implements OAuthHandlers {
const strategy = new OidcStrategy(
{
client,
passReqToCallback: false as true,
passReqToCallback: false,
},
(
tokenset: TokenSet,
@@ -94,7 +94,7 @@ export class OktaAuthProvider implements OAuthHandlers {
clientSecret: options.clientSecret,
callbackURL: options.callbackUrl,
audience: options.audience,
passReqToCallback: false as true,
passReqToCallback: false,
store: this.store,
response_type: 'code',
},
@@ -71,7 +71,7 @@ export class OneLoginProvider implements OAuthHandlers {
clientID: options.clientId,
clientSecret: options.clientSecret,
callbackURL: options.callbackUrl,
passReqToCallback: false as true,
passReqToCallback: false,
},
(
accessToken: any,