-
Notifications
You must be signed in to change notification settings - Fork 168
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
Incorrect user provider being recorded for server api key users #5914
Comments
➤ James Stone commented: The set of supported providers is defined by the server and it doesn't look like it has anything called a "Server API Key", just a generic "API key" (source). I'm not sure how we ended up with two names for the same thing on the client side, perhaps there are historical naming conventions from stitch for providing a synonym. [~[email protected]] do you know? In any case I can confirm that they are the same thing under the hood. |
Interesting, I guess it doesn't make sense to expose different provider types for new SDKs then. cc @cmelchior if you haven't exposed the server api key credentials yet, you may want to opt for a single api key credential type. |
➤ Jason Flax commented: This was how the original Stitch API was designed. I do not recall when the two providers were flattened into one. |
When we persist the user in the metadata Realm, we use the string representation of the provider but we have the same representations for
apiKey
andserverApiKey
:realm-core/src/realm/object-store/sync/app_credentials.cpp
Lines 33 to 34 in 7b08700
Is this intentional? This has the unpleasant side effect that:
enum_from_provider_type(provider_type_from_enum(AuthProvider::SERVER_API_KEY)) != AuthProvider::SERVER_API_KEY;
And if you log in a user with a server api key credential, their provider will instead be
API_KEY
.The text was updated successfully, but these errors were encountered: