
Hi there,
I am currently exploring apple sign in using Appwrite. Google works great, but when I log in using my apple ID there is no name returned. Both the first time, and times after that.
And apple has the function the hide the user's email. Apple provides an private for them. But when I select this function, my actual email is returned instead of the one generated by apple.
How can I solve these two problems?
Would love to hear your thoughts. Code pasted below.
// Functie om in te loggen async function handleGoogleLogin() { account.createOAuth2Session( 'google', 'https://just-roomies.com/test-login2.html', 'https://just-roomies.com/test-login2-fail.html' ) };
async function handleAppleLogin() {
account.createOAuth2Session(
'apple',
'https://just-roomies.com/test-login2.html',
'https://just-roomies.com/test-login2-fail.html'
)
};
async function getUser() {
try{
const user = await account.get()
renderProfileScreen(user)
}catch(error) {
renderLoginScreen()
}
}
function renderLoginScreen() {
loginScreen.classList.remove('hidden');
}
function renderProfileScreen(user) {
userName.textContent = user.name;
console.log(user)
profileScreen.classList.remove("hidden");
}
function handleLogout() {
account.deleteSession('current')
profileScreen.classList.add("hidden");
renderLoginScreen()
}
getUser()
Recommended threads
- Exposing project id and endpoint on GitH...
Is it best practice to expose your project id and endpoint in your appwrite.js file when publishing an NextJS or Angular project. If you use a .env file, that i...
- File tokens regenerate each page reload
Hello, on appwrite 1.7.4, when I create a file token via the API Tokens(appwriteAdminClient)#createFileToken I get a secret, then when I check in the console t...
- CSV Import Shows Success but Data Not Ap...
I tried importing a CSV file into my PRODUCTS collection. The dashboard shows the message “Import to PRODUCTS completed successfully,” but no data appears in th...
