Jimmy
Jimmy

Reputation: 12517

GAE - Share user authentication across apps

Let's say I run two different apps on different domains, coded in Python flask and running as GAE instances; one is site.co.uk and one is site.us.

If I use the GAE authentication on one site is it possible to have them authenticated for the other site too? I don't really want to make them have to authenticate for each country specific domain.

Upvotes: 0

Views: 58

Answers (1)

Gabriel
Gabriel

Reputation: 872

You can't reuse the Users service authentication across different applications. A possible solution could be using a OAuth2 (or a similar mechanism) - create an application (or use one of you existing applications) which will be the authentication provider. Each application will redirect to the authentication provider where the user will get authenticated, and then redirected back. If the user is already authenticated, they will not need to authenticate again when switching applications. This way you won't be able to use the Users service on the end applications, only in the provider, so you will need to rely on another way to store the currently logged in user in each application (like datastore+memcache).

Upvotes: 1

Related Questions