Search code examples
pythondjangoauthorizationserver-side

One login for multiple products


There are multiple mobile apps. I want people using one app to login with their same login credentials into all other apps.

What is the best approach to implement this?

I'm thinking to create a separate authorization server that will issue tokens/secrets on registering and logins. It will have a validation API that will be used by mobile app servers to validate requests.


Solution

    1. First check if OAuth could be adapted to using this, that would save you a lot of work. Of course all the services and apps would have to talk to some backend network server to sync tokens issued to apps.

    2. Half-secure/maybe-abusable solution: have symmetric cipher encrypted cookie that webpages (and apps?) hold and use it for authorization with different network services (which again have to verify cookie for authorization with authorization service that knows the passphrase used to encrypt the cookie)

    I've used approach #2 on internal systems but I am not sure if it is advisable to use it in in the wild - this may pose some security risks.