sdk-for-web
sdk-for-web copied to clipboard
๐ Bug Report: React Native - createOAuth2Session throws error
๐ Reproduction steps
Start a new React Native project. Enable OAuth.
import React from 'react';
import {Button, Text, View} from 'react-native';
import {Client, Account} from 'appwrite';
const client = new Client()
.setEndpoint('https://endpoint/v1')
.setProject('12343455667');
const App = () => {
function handleUserLogin() {
const account = new Account(client);
const session = account.createOAuth2Session('google');
return session;
}
return (
<View>
<Text>Hello world</Text>
<Button title="Login" onPress={handleUserLogin} />
</View>
);
};
๐ Expected behavior
Should have opened a window for selecting an account from the OAuth client like google
๐ Actual Behavior
Throwed Error
TypeError: Cannot set property href of [object WorkerLocation] which has only a getter

๐ฒ Appwrite version
Different version (specify in environment)
๐ป Operating system
Windows
๐งฑ Your Environment
I am using Appwrite v:1.0.1.500 React Native 0.70.1 React 18.1.0
๐ Have you spent some time to check if this issue has been raised before?
- [X] I checked and didn't find similar issue
๐ข Have you read the Code of Conduct?
- [X] I have read the Code of Conduct
I would like to work on this issue please