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
- Auth Issue (maybe?)
Hi there, I'm relatively new to programming and am following a tutorial on youtube just to get an idea of how this all is suppossed to work. Now Im setting up t...
- Hi Folks, Database Writing Issue
Hey Folks im trying to get logging setup on my website but im getting an error, i dont have any document id and i think this is the issue but i havent got the f...
- Imagine.dev Auth Error
Be careful! The redirect_uri is not associated with this application. The application might be misconfigured or could be trying to redirect you to a website y...