Hi guys,
I wonder if any one has run into this issue, and how did you go about solving it?
I'm running mongodb-stitch-react-native-sdk 4.4.1 on react-native ~0.57.4.
Anonymous login doesn't seem to want to work on Android. It works fine on iOS.
const cred = new AnonymousCredential();
const client = Stitch.defaultAppClient;
client.auth.loginWithCredential( cred ).then (user => {
console.log(user);
}).catch(e => {
console.log(e);
});
This doesn't seem to work. I get this weird error -- undefined is not an object (evaluating '_d[0]').
Yes, I've already initialized Stitch like so -
Stitch.initializeDefaultAppClient( appID ).then(stitchClient => {
console.log(stitchClient);
})
if I console.log( cred ), I get -
{
providerType: 'anon-user',
material: {},
providerCapabilities: { reusesExistingSession: true },
providerName: 'anon-user'
}
What may I be doing wrong? Any help would be appreciated.
Raj