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

Add login to mobile app #51

Open
megamattron opened this issue Jul 26, 2016 · 0 comments
Open

Add login to mobile app #51

megamattron opened this issue Jul 26, 2016 · 0 comments

Comments

@megamattron
Copy link
Member

The new mobile app login path is described in #49 and was added in 1136e4c - basically it allows for a separate login path that redirects back to a mobile app URL scheme with a special login access token for the app. We now need to support storing and using this access token in the app. So the following things need to happen:

  1. If no access code is in storage, show a welcome page with a login button.
  2. When the login button is pressed open a browser (or show a webview overlay, not sure which one is best) to http://www.breakerapp.com/application/startAuthForMobileApp - this will run through the login process in the browser and eventually redirect to breaker://auth/[access_code]
  3. Configure app to intercept that URL scheme (or if you decide to use the webview, watch the requests that are loaded in the webview for a URL of that type - actually the webview might be a better idea rather than trusting the system browser) and parse out the access code and store it in the app's local storage.
  4. For every request to the server afterwards include the http header "X-BreakerAccessCode: [access_code_that_you_stored_above]" - the server will then recognize the user that logged in automatically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant