Open kraenhansen opened 4 years ago
The documentation also points to a single apiKey
function which causes an error in Realm (node sdk).
https://docs.mongodb.com/realm/node/authenticate/#api-key
Using Realm.Credentials.serverApiKey()
instead of Realm.Credentials.apiKey()
works.
We've discussed merging the concept of server and a user API keys in the SDKs and the current implementation publishes two different methods for server and user API keys.
Current situation:
serverApiKey
anduserApiKey
https://github.com/realm/realm-js/blob/v10/types/app.d.ts#L152.apiKey
https://docs.mongodb.com/realm/node/authenticate/#api-key.serverApiKey
,userApiKey
andapiKey
https://github.com/realm/realm-js/blob/v10/packages/realm-web/src/Credentials.ts#L59-L91.serverApiKey
anduserApiKey
https://github.com/realm/realm-js/blob/v10/src/js_app_credentials.hpp#L62-L63.