Description
🔖 Feature description
moved from appwrite issue #8867
I wasn't sure if I should be putting this under bug report, enhancement, or documentation, but considering I'm newer to expo+appwrite+react native, I decided to put this under enhancement because this may be intentional.
The documentation of Oauth2 / google seems like account.createOAuth2Session(OAuthProvider.Google);
should automatically open the login page for the Oauth2 provider.
However upon trying this in code, it seems to give the URI. And on mobile, no browser window or redirect occurs - the same screen still displays.
export const googleLogin = async () => { // Add async here to handle the session creation
try {
console.log('Initiating Google login...');
// Create the OAuth2 session URL
const uri = await account.createOAuth2Session('google');
console.log(uri);
} catch (error) {
console.error('Error during Google login:', error);
}
};
I tried both the appwrite
and react-native-appwrite
libraries, and both seem to have a similar effect.
🎤 Pitch
As a newer user of appwrite, this was super confusing. I thought the mobile application would redirect me or open a new window with the URI containing the Oauth2 provider's login portal just by invoking the createOAuth2Session
method. This is not the case, even with any of the optional parameters.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct