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

Crash when logged-in users update an app with the new SDK version #73

Open
timoinutilis opened this issue May 27, 2024 · 0 comments
Open

Comments

@timoinutilis
Copy link

timoinutilis commented May 27, 2024

If a user logged in with an app using the old Cidaas SDK and then update to a version with the new Cidaas SDK, it will crash.

The problem is the function accessTokenModelToAccessTokenEntity:

One line was was changed from:
AccessTokenModel.shared.refresh_token = accessTokenEntity.refresh_token
to:
AccessTokenModel.shared.refresh_token = try! accessTokenEntity.refresh_token.aesEncrypt(key: key, iv: salt)

There is no fallback for old user data without encryption, and there is no error handling either. It just crashes.

The same seems to be true for access_token

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

No branches or pull requests

1 participant