Comments (2)
Thank you, that was a awesome answer.
from guardian_db.
How are the tokens stored in the DB, would make sense to store the sessions as hash only?
This is the information save from the token
guardian_db/lib/guardian/db/token.ex
Lines 15 to 25 in 0b86831
You rely on JWT encryption to validate and retrieve the token back
guardian_db/lib/guardian/db.ex
Line 137 in 0b86831
You save the JWT token as API key, Guardian.DB will keep track of that token in the database using the hooks from the documentation, so it is easier for you invalidate the tokens.
From your use cases, it seems you need something like OAuth2 Provider instead.
Useful links
Also, I will encourage you to ask this question in Ueberauth Slack channel or Elixir forum since more people will be able to help you; this is a per-application use case.
from guardian_db.
Related Issues (20)
- separated token schemes HOT 4
- Revoking Token thats already been removed throws error rather than returning error HOT 1
- Dependency Update
- Changelog updates since 0.8 HOT 3
- How to add more columns to 'guardian_tokens' table? HOT 5
- Compatibility with Guardian 2.0 HOT 2
- Idea: Use gen server to avoid round-trip to database HOT 9
- Update ecto_sql(currently at 3.1.0) dependency to the latest version HOT 1
- Do not fix ecto version HOT 2
- Documentation: need to update migrations if using non-default table name
- Guardian DB Redis Repo HOT 11
- Ecto.StaleEntryError when using Guardian.DB.on_revoke HOT 8
- cut a new release? HOT 1
- Add a column to optionally store the jti of the refresh token used to generate an access token. HOT 2
- Publish new release HOT 1
- `Guardian.DB.Sweeper` incompatible with old worker API HOT 1
- function Guardian.DB.on_refresh/2 is undefined or private HOT 3
- guardian_db fails to compile with Ecto 3 rc (undefined function migrations_path/1) HOT 20
- how to use in two or more servers with login just one time? share pwd HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guardian_db.