-
Notifications
You must be signed in to change notification settings - Fork 711
Mobile: Native log in #1941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Mobile: Native log in #1941
Conversation
|
1 similar comment
|
|
Thanks for your feedback! This is a WIP and isn't ready yet 😄 |
aaa225a to
b74d8b0
Compare
5dbbcaa to
4c62455
Compare
|
@olivaresf seems like you don't have your email address added to Github so it doesn't show proper attribution on your commits. |
|
I pushed a few small changes and added comments to point them out. |
9462b97 to
af9c1b6
Compare
ad62957 to
558f9ca
Compare
3f17434 to
79e77a3
Compare
558f9ca to
f35690b
Compare
1b15f41 to
f35690b
Compare
The identity endpoint can be used to fetch that information
We had a call about this. In short, we could reuse access tokens but then the user would see access tokens for every mobile device they have without any indication as to what is going on. So, since this really is just logging in instead of an integration which seems to be the primary purpose of access tokens, we can just use our regular session cookie for authentication.
f35690b to
3dca960
Compare
* origin/main: (67 commits) Wrap join code redemption in a lock Remove redundant include Replace custom code generator with Base32 Test that you can't go to the magic link screen without an email Bundle drift detection and correction (#2101) Refactor: Use Rails range syntax in ActivitySpike query (#2080) Fix indentation in multi_db.rb initializer (#2082) Fix typo in translate property in card columns CSS (#2090) Refactor: use idiomatic .last instead of .order(:desc).first (#2098) bin/bundle-both (#2100) API: Allow updates to `last_active_at` (#2076) Move email address into hint line Bump fizzy-saas to pickup another staging change. Remove the rails credentials from .gitattributes Fix typo: minues → minutes Fix duplicate word: use use → use Add QrCodesController test Fix typo in _entropy.html.erb Show the email address you are signing in with Prohibit access to magic links unless an email address ... # Conflicts: # app/controllers/sessions/magic_links_controller.rb # app/controllers/sessions_controller.rb
| def new | ||
| end | ||
|
|
||
| def create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monorkin could you lend me a hand here? My gut feeling is that this code could be simplified but I'm not entirely sure how 🤔
* origin/main: Unused Use new FIZZY_GH_TOKEN with limited access Use Sec-Fetch-Site exclusively for CSRF protection Document Docker image deployment saas: Bump queenbee gem for new staging location Apply theme preference before body Better mini-bubble position for the Maybe column
Adds JSON API support for the magic link authentication flow, enabling native mobile clients to authenticate. Instead of setting a cookie as an added security measure, we're sending back a
pending_authentication_tokenthat needs to be returned to the server when validating a code.POST /session.json { email_address: "..." }
session_magic_link_path, so there's no leak regarding email presence. For that reason, this endpoint always returns apending_authentication_tokeneven if no email was sent.:unprocessable_entityjust like the web.POST /session/magic_link.json { code: "...", pending_authentication_token: "..." }