Skip to content

Commit

Permalink
Merge pull request #136 from amtrack/fix/login-redirect-url
Browse files Browse the repository at this point in the history
fix: set login retURL to setup page
  • Loading branch information
amtrack authored Mar 29, 2019
2 parents ed19e88 + 6be823a commit ddfb037
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/browserforce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import * as puppeteer from 'puppeteer';
import * as querystring from 'querystring';
import { parse, URL } from 'url';

const PERSONAL_INFORMATION_PATH =
'setup/personalInformationSetup.apexp?nooverride=1';
const POST_LOGIN_PATH = 'setup/forcecomHomepage.apexp';

const ERROR_DIV_SELECTOR = '#errorTitle';
const ERROR_DIVS_SELECTOR = 'div.errorMsg';
Expand All @@ -29,7 +28,7 @@ export default class Browserforce {
await this.openPage(
`secur/frontdoor.jsp?sid=${
this.org.getConnection().accessToken
}&retURL=${encodeURIComponent(PERSONAL_INFORMATION_PATH)}`,
}&retURL=${encodeURIComponent(POST_LOGIN_PATH)}`,
{ waitUntil: ['load', 'domcontentloaded', 'networkidle0'] }
);
return this;
Expand Down

0 comments on commit ddfb037

Please sign in to comment.