Skip to content

Commit

Permalink
Fix: lowercase locales (#551)
Browse files Browse the repository at this point in the history
* change share query location from preview

* adds a redirecturi in lowercase when signing in

* localise locale section
  • Loading branch information
thewahome authored May 28, 2020
1 parent 36c1468 commit c81ea73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/app/services/graph-client/msal-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export async function logIn(sessionId = ''): Promise<any> {
const loginRequest: AuthenticationParameters = {
scopes: defaultUserScopes,
prompt: 'select_account',
redirectUri: window.location.href.toLowerCase(),
extraQueryParameters: { mkt: geLocale }
};

Expand Down Expand Up @@ -82,8 +83,8 @@ export function logOutPopUp() {
// @ts-ignore
msalApplication.authorityInstance.resolveEndpointsAsync().then(authority => {
const urlNavigate = authority.EndSessionEndpoint
? authority.EndSessionEndpoint
: `${msalApplication.authority}oauth2/v2.0/logout`;
? authority.EndSessionEndpoint
: `${msalApplication.authority}oauth2/v2.0/logout`;
(msalApplication as any).openPopup(urlNavigate, 'msal', 400, 600);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/common/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const createShareLink = (sampleQuery: IQuery, authenticated?: boolean): s

const url = new URL(sampleUrl);
const graphUrl = url.origin;
const appUrl = 'https://developer.microsoft.com/' + geLocale + '/graph/graph-explorer/preview';
const appUrl = 'https://developer.microsoft.com/' + geLocale.toLowerCase() + '/graph/graph-explorer';
/**
* To ensure backward compatibility the version is removed from the pathname.
* V3 expects the request query param to not have the version number.
Expand Down

0 comments on commit c81ea73

Please sign in to comment.