Skip to content

Commit

Permalink
Merge pull request #225 from Esri/world-wide-web
Browse files Browse the repository at this point in the history
fix(auth): use www.arcgis.com consistently
  • Loading branch information
tomwayson authored Jun 19, 2018
2 parents 1ca31f7 + a7dc28d commit 25d5b4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/arcgis-rest-auth/src/UserSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ export class UserSession implements IAuthenticationManager {
locale
}: IOauth2Options = {
...{
portal: "https://arcgis.com/sharing/rest",
portal: "https://www.arcgis.com/sharing/rest",
duration: 20160,
popup: true,
state: options.clientId,
Expand Down Expand Up @@ -371,7 +371,7 @@ export class UserSession implements IAuthenticationManager {
/* istanbul ignore next */
static completeOAuth2(options: IOauth2Options, win: any = window) {
const { portal, clientId }: IOauth2Options = {
...{ portal: "https://arcgis.com/sharing/rest" },
...{ portal: "https://www.arcgis.com/sharing/rest" },
...options
};

Expand Down
6 changes: 3 additions & 3 deletions packages/arcgis-rest-auth/test/UserSession.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ describe("UserSession", () => {
});

expect(MockWindow.open).toHaveBeenCalledWith(
"https://arcgis.com/sharing/rest/oauth2/authorize?client_id=clientId123&response_type=token&expiration=20160&redirect_uri=http%3A%2F%2Fexample-app.com%2Fredirect&state=abc123&locale=",
"https://www.arcgis.com/sharing/rest/oauth2/authorize?client_id=clientId123&response_type=token&expiration=20160&redirect_uri=http%3A%2F%2Fexample-app.com%2Fredirect&state=abc123&locale=",
"oauth-window",
"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes"
);
Expand Down Expand Up @@ -457,7 +457,7 @@ describe("UserSession", () => {
});

expect(MockWindow.open).toHaveBeenCalledWith(
"https://arcgis.com/sharing/rest/oauth2/authorize?client_id=clientId123&response_type=token&expiration=20160&redirect_uri=http%3A%2F%2Fexample-app.com%2Fredirect&state=clientId123&locale=fr",
"https://www.arcgis.com/sharing/rest/oauth2/authorize?client_id=clientId123&response_type=token&expiration=20160&redirect_uri=http%3A%2F%2Fexample-app.com%2Fredirect&state=clientId123&locale=fr",
"oauth-window",
"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes"
);
Expand Down Expand Up @@ -488,7 +488,7 @@ describe("UserSession", () => {
);

expect(MockWindow.location.href).toBe(
"https://arcgis.com/sharing/rest/oauth2/authorize?client_id=clientId123&response_type=token&expiration=20160&redirect_uri=http%3A%2F%2Fexample-app.com%2Fredirect&state=clientId123&locale="
"https://www.arcgis.com/sharing/rest/oauth2/authorize?client_id=clientId123&response_type=token&expiration=20160&redirect_uri=http%3A%2F%2Fexample-app.com%2Fredirect&state=clientId123&locale="
);
});
});
Expand Down

0 comments on commit 25d5b4f

Please sign in to comment.