
Hi there, this is my use case:
Allow an individual to sign up using Apple OAuth, then set up the username, name and age fields for the user collections in the database.
I have configured the "Continue with Apple" button component using Expo Apple Auth and can successfully retrieve the user email. How do I then register the user as an Appwrite auth user and then setup a username, age and name fields?
This is my login component:
<AppleAuthentication.AppleAuthenticationButton
buttonType={
AppleAuthentication.AppleAuthenticationButtonType.CONTINUE
}
buttonStyle={AppleAuthentication.AppleAuthenticationButtonStyle.BLACK}
cornerRadius={10}
style={styles.button}
onPress={async () => {
try {
const credential = await AppleAuthentication.signInAsync({
requestedScopes: [
AppleAuthentication.AppleAuthenticationScope.EMAIL,
],
});
// signed in
// WHAT AM I SUPPOSED TO DO AFTER GETTING THE CREDENTIALS?
console.log(credential);
} catch (e) {
if (e.code === "ERR_REQUEST_CANCELED") {
} else {
// handle other errors
}
}
}}
/>
this is my Appwrite config file that has the create oauth session:
export const createSession = async () => {
account.createOAuth2Session(OAuthProvider.Apple);
};
How do i essentially connect the two? How do i register this apple id as an auth user and connect them to my user collections? Thank you for your help.
Recommended threads
- I can't use any Oauth
Login using oauth will be rejected because the redirect url does not match but appwrite give me the redirect url is https://**************/v1/account/sessions/o...
- I am getting a Invalid relationship valu...
Uploaded PDF, got file ID: 6894dea900399c4b51d2 LOG [ExportPDF] Updating FinalReport with PDF. FinalReportId: 6894dea80038a20f0858 pdfFileId: 6894dea900399c4b...
- Changing password when logged using a OT...
I'm developping in flutter/dart, I'm using email token to login to an existing user: _sessionToken = await account.createEmailToken(userId: app.ID.unique(), ema...
