how to use in production
Balogunolalere opened this issue · 3 comments
awesome package but would love to know how to use in production and the difference in the client and server because the docs were dark on that...would appreciate...thanks
@Balogunolalere welcome, i am happy you are enjoying it so far.
I may be able to provide more help if you can share more about what you are deploying to production.
An EasyAuthServer
differs from an EasyAuthClient
mostly in responsibilities:
EasyAuthServer
- Manages Users, Service Accounts, Groups, Roles, Permissions, Tokens, Third-party OAuth, Email Registrations
- Database Required
- Admin GUI
- EasyAuth Routers to protect API endpoints
- Login / Registration, & cookies
EasyAuthServer
- Connects to an existing existing EasyAuthServer ( required)
- No Database Required
- EasyAuth Routers to protect API endpoints
- Login / Registration, & cookies via connected EasyAuthServer
The main idea is to re-use existing authentication configuration where possible. Multiple separate applications are able to share a single EasyAuthServer via EasyAuthClients, reducing the need to manage / update different databases.
thanks for the reply...tried using it with deta micros and had no idea on how to and also kept giving this google-apis error...any help on what i am doing wrong?
Just reviewing the docs for deta micro's it seems there are a number of limitations that would prevent EasyAuth from working correctly: https://docs.deta.sh/docs/micros/about/
- "Micros only support read-only SQLite, which you could deploy with your code" - EasyAuth will need to write to the DB
- "For unknown reasons, Google and Firebase packages for Python do not install successfully on Micros." for Oauth, google is a requirement
- "Websockets and long-running processes do not work on Micros. (examples: socket.io or Discord bots won't work)" EasyAuth is both long running & uses websockets to communicate between EasyAuthServer & EasyAuthClients.
My suggestion, pick a different platform. Of course where and how you run this depends on what you are building. Feel free to share more, and I may be able to provide other suggestions.