-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Autosubmit token by paste and a bit more #583
Autosubmit token by paste and a bit more #583
Conversation
akellbl4
commented
Jan 26, 2020
•
edited
Loading
edited
- Autosubmit in email auth Autosubmit on paste the token in inputs #538
- Autosubmit in email subscribe Autosubmit on paste the token in inputs #538
- Using official typings instead copied
- Tests for JWT funcs
- Tests for the interfaces
|
@umputun fixed. I just forgot to push one of the files with which I am working now. |
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.
Auto-submit works fine for me in Firefox for both auth and subscription. Invalid (but correct) token sent automatically and shows validation error without pushing the submit button as well.
I have not tried it, but not really sure I get how all of this supposed to work. So, user pastes token and it got submitted by itself? If that's the case, why the Submit button even needed? And, in addition, this automatic submission feels kind of exotic and unusual to me. |
@umputun yep, if a user pastes the correct token it sends automatically. |
There might be errors like "Too many requests, try later" and I would prefer having the submit button all the time to deal with them manually in case it's needed. After automatic submit user end up either logged in (with auth) or with page "you are subscribed, click here to unsubscribe" (notifications) - this is the desired output of the process user started. It might be surprising to skip the "push submit button" step but the user won't feel lost in my opinion. I have the same mechanics working for my bank 3-D Secure pin-code from SMS prompt, I recall being surprised in a good way when I found I don't need to push any buttons after I entered expected four digits. My vote is for introducing this feature in a way it was implemented in this PR. |
ok, convinced. As soon as we get approval from @Mavrin I'll merge |
frontend/package.json
Outdated
@@ -43,6 +44,7 @@ | |||
"@types/redux-mock-store": "^1.0.1", | |||
"@typescript-eslint/eslint-plugin": "^2.5.0", | |||
"@typescript-eslint/parser": "^2.5.0", | |||
"atob": "^2.1.2", |
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.
It looks unnecessary or use for node
const atob = (value) => Buffer.from(value, `base64`).toString();
* Use lib for typing tests instead copied types * add jwt utils * Add autosending * fix * tests * remove atob and fix tests