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
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...