Comments (5)
Thanks for reporting this issue. I'll look into it and get back to you soon.
from phauxth.
I've added some changes to the master branch. I've made the report function overridable and updated the Confirm.Login module to use it. As you can see from the Confirm.Login example, it is not necessary to redefine all the report clauses - you just need to add your additional entries and then add an additional clause calling super
on the arguments.
Let me know how that works and / or if you need any further information.
from phauxth.
Thank you very much. I will give some feed back once I get a chance to look into it. :)
from phauxth.
Nice so allowing for the override was what looks like needed to happen.
I made a simple example app showing how I'm trying to use a custom login module.
https://github.com/digitalcake/active_user_example_phauxth/blob/master/lib/active_user_example_phauxth/accounts/login.ex
Let me know if that is inline with your design you had for how people would extend that base login module. ("aside from extracting the reports & messages to its own module ect..")
So far it looks like it works. Thanks for the help again.
from phauxth.
I just updated the hex package with the new changes.
Thanks for showing me the example. I have just one comment to make. For the report
fallback function, you just need one clause, like this:
def report(result, ok_message, meta) do
super(result, ok_message, meta)
end
The pattern matching is then done by the default implementation. This is how the new version of the Confirm.Login module works.
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
- [FEATURE] phauxth for umbrella apps HOT 6
- [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.