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

Share login with self-hosted iD #1910

Closed
pantierra opened this issue Oct 9, 2019 · 5 comments
Closed

Share login with self-hosted iD #1910

pantierra opened this issue Oct 9, 2019 · 5 comments

Comments

@pantierra
Copy link
Contributor

After supporting iD to be self-hosted (#1909) in a next step it is good to reduce the logins needed to get started with mapping in order to provide a seamingless experience to the users.

After logging into the Tasking Manager a user should be able to start mapping on the embedded iD without the need to login the editor again.

@pantierra
Copy link
Contributor Author

As a first idea it came up to share the oauth key received through the Tasking Manager login with the self-hosted iD through private channels (e.g. docker network).

@pantierra
Copy link
Contributor Author

Some more information on this idea:

TM can do similar to what osm.org does:

  • Task manager becomes the main site and stores the users secrets however it needs to
  • iD runs in an iframe and TM passes the credentials to iD through the iframe. Javascript code that starts iD already has the credentials.

Here is the code for osm.org. It’s Rails but the TM code would be similar.

That’s why users on osm.org don’t need to login to iD separately. The Task Manager can do it that way too.

@pantierra
Copy link
Contributor Author

I know there has been significant progress here. @JorgeMartinezG can you please share the status?

@JorgeMartinezG
Copy link
Contributor

Update: In order to use Tasking Manager oauth credentials in id, we must pass to the frontend from the server (oauth consumers and tokens) the required keys to be rendered within the react component. The component must have iD embedded and call the preauth option when the it is mounted: https://github.com/openstreetmap/iD/blob/7b7a42cf762be970252a712044f4aedaa1bdb756/modules/core/context.js#L99

Note: For now, in this branch 12ee81c id is served as a static folder

@pantierra
Copy link
Contributor Author

This looks good so far. We are implementing other parts on iD in the meantime. This can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants