Make sure users are signed in when clicking on managed cards#4255
Make sure users are signed in when clicking on managed cards#4255joelbettner merged 7 commits intomainfrom
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.
This would be better in ROUTES, there are no functions in this file, and tons in ROUTES
src/ROUTES.js
Outdated
| import {Linking} from 'react-native'; | ||
| import Onyx from 'react-native-onyx'; | ||
| import {addTrailingForwardSlash} from './libs/Url'; | ||
| import {GetAccountValidateCode} from './libs/API'; |
There was a problem hiding this comment.
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.
I don't know... tried putting it in URL but got the same shitty circular dependency.
There was a problem hiding this comment.
Open to suggestions...
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.
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