Skip to content
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

Implement infinite sessions #7

Merged
merged 10 commits into from
Aug 8, 2020
Merged

Implement infinite sessions #7

merged 10 commits into from
Aug 8, 2020

Conversation

AndrewGable
Copy link
Contributor

Implemented infinite sessions:

  1. On the sign in page pass useExpensifyLogin = true for the first Authenticate which will create a new login via CreateLogin
  2. In CreateLogin use React-Native-Chat-${guid} for the login name and ${guid} for the password
  3. Store the random login and password
  4. Store the last time we successfully authenticated
  5. When calling verifyAuthToken check the last time, if it's more than 90 minutes use the random login and password to call authenticate
  6. Delete the login we created on sign out

@AndrewGable AndrewGable requested a review from tgolen August 8, 2020 18:54
@AndrewGable AndrewGable self-assigned this Aug 8, 2020
src/lib/Str.js Show resolved Hide resolved
src/page/SignInPage.js Outdated Show resolved Hide resolved
src/page/SignInPage.js Outdated Show resolved Hide resolved
src/store/actions/SessionActions.js Outdated Show resolved Hide resolved
Comment on lines 109 to 111
.catch((err) => {
Store.set(STOREKEYS.SESSION, {error: err.message});
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.catch((err) => {
Store.set(STOREKEYS.SESSION, {error: err.message});
});
.catch(err => Store.set(STOREKEYS.SESSION, {error: err.message}));

Make sure your linter is working, because this should have thrown a listing error. Also, it's maybe better to use merge() here so it doesn't blow away the rest of the stuff on that key. I can do that in a followup PR too since this branch doesn't have merge yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, the session is going to be tricky not to blow away

src/store/actions/SessionActions.js Show resolved Hide resolved
src/store/actions/SessionActions.js Outdated Show resolved Hide resolved
src/store/actions/SessionActions.js Outdated Show resolved Hide resolved
src/store/actions/SessionActions.js Outdated Show resolved Hide resolved
src/store/actions/SessionActions.js Outdated Show resolved Hide resolved
@tgolen tgolen merged commit fd60e71 into master Aug 8, 2020
@tgolen tgolen deleted the andrew-session branch August 8, 2020 20:17
AndrewGable pushed a commit that referenced this pull request Mar 4, 2021
Julesssss pushed a commit that referenced this pull request Apr 7, 2021
@OSBotify
Copy link
Contributor

🚀 [Deployed](https://github.com/Expensify/Expensify.cash
/actions/runs/765130740) 🚀 to
staging on Mon Apr 19 2021 at 22:41:56 GMT+0000 (Coordinated Universal Time)

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@cloudflare-pages
Copy link

cloudflare-pages bot commented Oct 24, 2023

Deploying helpdot with  Cloudflare Pages  Cloudflare Pages

Latest commit: 196ecde
Status: ✅  Deploy successful!
Preview URL: https://6cb7ffcd.helpdot.pages.dev

View logs

MrMuzyk added a commit to MrMuzyk/App that referenced this pull request Jan 24, 2024
* feat: Added missing validation and QOL change on UBO confirm step

* fix: add missing prop
francoisl pushed a commit that referenced this pull request Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants