Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

singleSignOn() #59

Open
mrWh1te opened this issue Aug 27, 2020 · 1 comment
Open

singleSignOn() #59

mrWh1te opened this issue Aug 27, 2020 · 1 comment
Labels
botaction proposal New feature or change

Comments

@mrWh1te
Copy link
Owner

mrWh1te commented Aug 27, 2020

Related to #45 browser()

For web apps' with single sign on via a separate pop-up window. Need browser to grab pages to find the other window to manipulate with the bot to complete sso

Maybe a popup() BotAction for injecting the page of the 2nd page from the browser?

@mrWh1te mrWh1te added proposal New feature or change botaction labels Aug 27, 2020
@mrWh1te
Copy link
Owner Author

mrWh1te commented Apr 27, 2021

/**
 * @description  BotAction that attempts the login flow for TikTok
 * @param identification phone, email or username - phone is a number, email||username is a string
 * @param password
 * @param provider
 */
export const login = (identification: string|number, password: string, provider?: 'facebook'|'google'|'twitter'|'apple'|'instagram'): BotAction =>
  provider ? singleSignOn(identification, password, provider) : chain(
    errors('TikTok phone/email/username login()')(
      goToLogin,
      clickText('Use phone / email / username'),
      typeof identification === 'number' ? chain() : chain(),
      click(FORM_AUTH_USERNAME_INPUT_SELECTOR),
      type(identification.toString()),
      click(FORM_AUTH_PASSWORD_INPUT_SELECTOR),
      type(password),
      clickText('Log in'),
      waitForNavigation,
      log('Login Complete')
    )
  )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
botaction proposal New feature or change
Projects
None yet
Development

No branches or pull requests

1 participant