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

JWT AuthenticationProvider not fully supported #1350

Closed
sebdomdev opened this issue Apr 14, 2023 · 1 comment
Closed

JWT AuthenticationProvider not fully supported #1350

sebdomdev opened this issue Apr 14, 2023 · 1 comment
Assignees

Comments

@sebdomdev
Copy link

sebdomdev commented Apr 14, 2023

How frequently does the bug occur?

Always

Description

When checking for the provider of a user signed in with a JWT token, the sdk crashes.

The reason for the crash is that there is a kotlin TODO() function in getProviderFromCore
(Other mappings also contain TODO() functions).

Changing the line linked above to
AuthProvider.RLM_AUTH_PROVIDER_CUSTOM -> AuthenticationProvider.JWT
should fix the issue.
In another location, this has already been done.

Stacktrace & log output

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: <removed>, PID: 22790
    kotlin.NotImplementedError: An operation is not implemented.
        at io.realm.kotlin.mongodb.internal.UserImpl.getProviderFromCore(UserImpl.kt:196)
        at io.realm.kotlin.mongodb.internal.UserImpl.getProvider(UserImpl.kt:56)
...
 I/Process: Sending signal. PID: 22790 SIG: 9

Can you reproduce the bug?

Always

Reproduction Steps

Access UserImpl::provider for a user logged in with a JWT token.

Version

1.7.0

What Atlas App Services are you using?

Both Atlas Device Sync and Atlas App Services

Are you using encryption?

No

Platform OS and version(s)

Android sdk 31

Build environment

Android Studio version: 2021.2.1 Patch 1 (Chipmunk)
Android Build Tools version: 33.0.1
Gradle version: 7.3.3

@sebdomdev sebdomdev changed the title JWT AuthenticationProvider not full supported JWT AuthenticationProvider not fully supported Apr 14, 2023
@rorbech rorbech self-assigned this Apr 17, 2023
@rorbech
Copy link
Contributor

rorbech commented Apr 17, 2023

@sebdomdev Thanks for the report. I have put up a PR for fixing this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants