Skip to content

Commit

Permalink
feat: Add logout mode option to Game Bridge (#2126)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert authored Sep 2, 2024
1 parent 37cf85c commit fa19692
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/game-bridge/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ window.callFunction = async (jsonData: string) => {
case PASSPORT_FUNCTIONS.init: {
const request = JSON.parse(data);
const redirect: string | null = request?.redirectUri;
const logoutMode: 'silent' | 'redirect' = request?.logoutMode === 'silent' ? 'silent' : 'redirect';
if (!passportClient) {
const passportConfig = {
baseConfig: new config.ImmutableConfiguration({
Expand All @@ -231,6 +232,7 @@ window.callFunction = async (jsonData: string) => {
redirectUri: redirect ?? redirectUri,
logoutRedirectUri: request?.logoutRedirectUri,
crossSdkBridgeEnabled: true,
logoutMode,
};
passportClient = new passport.Passport(passportConfig);
trackDuration(moduleName, 'initialisedPassport', mt(markStart));
Expand Down

0 comments on commit fa19692

Please sign in to comment.