-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Make sure users are signed in when clicking on managed cards #4255
Conversation
src/CONST.js
Outdated
ADD_SECONDARY_LOGIN_URL: 'settings?param={%22section%22:%22account%22}', | ||
MANAGE_CARDS_URL: 'domain_companycards', | ||
ADD_SECONDARY_LOGIN_URL: '/settings?param={%22section%22:%22account%22}', | ||
VALIDATE_CODE_URL: (accountID, validateCode, exitTo = '') => { |
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.
This would be better in ROUTES, there are no functions in this file, and tons in ROUTES
src/ROUTES.js
Outdated
import {addTrailingForwardSlash} from './libs/Url'; | ||
import {GetAccountValidateCode} from './libs/API'; |
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.
Nab but it's a bit weird for ROUTES to depend on API. Is there a better place for openSignedInLink
?
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.
I don't know... tried putting it in URL but got the same shitty circular dependency.
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.
Open to suggestions...
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.
src/libs/actions/App.js
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.
ok moved
src/ROUTES.js
Outdated
* This links to a page in e.com ensuring the user is logged in. | ||
* It does so by getting a validate code and redirecting to the validate URL with exitTo set to the URL | ||
* we want to visit | ||
* @param {string} url relative URL to open in expensify.com |
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.
Does "relative" mean "with a leading slash", if so, can you add that explicitly?
Updated and retested (had not done it before the last push 😱 and it was broken) |
Had conflicts, updated this. @cead22 please reapprove, @joelbettner please do your first review. |
🚀 Deployed to staging in version: 1.0.81-6🚀
|
🚀 Deployed to production in version: 1.0.82-7🚀
|
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/171698
Tests
Tested On