Skip to content

Commit

Permalink
[MWPW-145189] Adobe Home post-login redirect (#2090)
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Bogos <[email protected]>
  • Loading branch information
overmyheadandbody and robert-bogos authored Apr 2, 2024
1 parent ccc6734 commit 89779d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,13 +776,15 @@ export async function loadIms() {
reject(new Error('Missing IMS Client ID'));
return;
}
const unavMeta = getMetadata('universal-nav')?.trim();
const [unavMeta, ahomeMeta] = [getMetadata('universal-nav')?.trim(), getMetadata('adobe-home-redirect')];
const defaultScope = `AdobeID,openid,gnav${unavMeta && unavMeta !== 'off' ? ',pps.read,firefly_api' : ''}`;
const timeout = setTimeout(() => reject(new Error('IMS timeout')), 5000);
window.adobeid = {
client_id: imsClientId,
scope: imsScope || defaultScope,
locale: locale?.ietf?.replace('-', '_') || 'en_US',
redirect_uri: ahomeMeta === 'on'
? `https://www${env !== 'prod' ? '.stage' : ''}.adobe.com${locale.prefix}` : undefined,
autoValidateToken: true,
environment: env.ims,
useLocalStorage: false,
Expand Down

0 comments on commit 89779d9

Please sign in to comment.