Comments (6)
Just added token_module
as an option. It's available in version 2.3.0.
There are examples of how to use it in the authenticate/token_test.exs
, confirm/base_test.exs
and remember_test.exs
test files.
Closing this issue now. If you have any questions / comments, just let me know.
from phauxth.
Which options are you trying to configure?
from phauxth.
Configuring the user_context
and the token_module
as in the example: https://github.com/riverrun/phauxth-example/blob/master/config/config.exs#L21 would result in something like this
# umbrella_app_1 config
config :phauxth,
user_context: UmbrellaApp1.Accounts,
token_module: UmbrellaApp1.Auth.Token
# umbrella_app_2 config
config :phauxth,
user_context: UmbrellaApp2.Accounts,
token_module: UmbrellaApp2.Auth.Token
Those config options will get overwritten in the umbrella.
from phauxth.
The user_context
can already be set as an option (keyword argument) for authenticate, login and confirm.
As for the token_module
, do you want to use different token modules for the different apps? I can add this - I just want to clarify what you want.
from phauxth.
For point 1, I was not aware of the user_context
option.
So having something like this
plug Phauxth.Authenticate, user_context: UmbrellaApp1.Accounts
in the router works perfectly!
For point 2, yes, that would be the idea. Having different token modules for different apps. It would be great if you add the option to the library.
Thanks so much! Not sure if I should close the ticket or leave it open for this new feature. So I will leave the decision to you.
from phauxth.
Adding token_module
as an option should be fairly straightforward. I will get back to you soon.
from phauxth.
Related Issues (20)
- Error with absinthe (Phoenix 1.4 and Phaux 2.0) HOT 1
- [FEATURE] Customizable max_age in tokens used by Remember HOT 5
- [BUG] Token generated later to same user can't work properly HOT 5
- Thanks for your hard work for 2.0 HOT 4
- [FEATURE] Add refresh token support HOT 2
- [BUG] Argon 2 error - function depreciation leads to 500 HOT 8
- seeds.exs from wiki HOT 3
- [BUG] Sessions are never validated by default HOT 6
- [FEATURE] Allow specifying domain for remember cookie HOT 4
- [BUG] Remember cookie doesn't last full time HOT 6
- Confusion over Phauxth.Remember :max_age HOT 1
- authenticate callback arity for token cookie module is incorrect HOT 2
- Working on Phoenix Liveview HOT 4
- [FEATURE] Create 'Phauxth.Remember.Base' module HOT 2
- [FEATURE] Too Many Login Attempts HOT 1
- [BUG] Can't download archive install HOT 4
- Wiki documentation update proposition HOT 1
- Generate both API and HTML
- change http://localhost:4000/sessions/new from text_input to password_input HOT 1
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 phauxth.