Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Session is not being kept between app initializations #17

Open
ThallesP opened this issue Jul 9, 2024 · 0 comments
Open

Session is not being kept between app initializations #17

ThallesP opened this issue Jul 9, 2024 · 0 comments

Comments

@ThallesP
Copy link

ThallesP commented Jul 9, 2024

Steps to reproduce

Please tell us exactly how to reproduce the problem you are running into.

  1. Initiate the lib
  2. Start a login session
  3. Restart the app

So basically, just use the lib normally.

Desktop (please complete the following information):

  • OS: MacOS

Smartphone (please complete the following information):

  • Device: iPhone 12 pro
  • OS: iOS 17.4

Additional context
After digging through the code we found the issue.

single-factor-auth-web uses @toruslabs/openlogin-utils at version 8.1.2
but single-factor-auth-react-native uses @toruslabs/openlogin-utils at version 6.1.0.

This causes problem because both are using different memory stores (as the toruslabs lib is a different version).
So when this lib tries to recover the session id from the keystore and set it in the memory store for the sfa-web to read it:

if (sessionId) this.storage.set("sessionId", sessionId);

the sfa-web will never be able to read that session because both of them started different storages because of different versions of openlogin-utils.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant