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

Login to Observe API #116

Merged
merged 5 commits into from
Oct 25, 2019
Merged

Login to Observe API #116

merged 5 commits into from
Oct 25, 2019

Conversation

batpad
Copy link
Member

@batpad batpad commented Oct 25, 2019

Implements a button on the Settings page to Login to the Observe API:

  • Needs OBSERVE_API_URL to be set in your .env file.
  • It will open the API /login URL in the default phone browser
  • After the user logs in, they are redirected to the app, and an action is fired that handles adding the token to the state at state.observeApi.token

We can then use this token to make authenticated calls to the API. I'll work on the boilerplate for a service to use the token and talk to the API in a separate PR.

TODO:

@batpad
Copy link
Member Author

batpad commented Oct 25, 2019

Amazingly, this seemed to work on iOs without any changes needed, since we already had the iOs stuff for Linking wired up.

@geohacker @sethvincent can you give this a look? I think this should be good to merge.

Fixes #116

@geohacker
Copy link
Member

@batpad this works well on iOS and Android for me. And I also checked along with OSM login. Seems all good 👍

@batpad batpad merged commit 663baf5 into develop Oct 25, 2019
@sethvincent sethvincent deleted the feature/api-auth branch October 25, 2019 17:24
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

Successfully merging this pull request may close these issues.

2 participants