sven09
BABetter Auth
•Created by Christer - Codehagen on 3/30/2025 in #help
Better Auth Microsoft OAuth - email_not_found Error
make sure your token from app registration sends email.
for dummy accounts in tests keep in mind they are not full profiles
this is your friend:
mapProfileToUser: async (profile: MicrosoftEntraIDProfile) => {
console.log(" mapProfileToUser: | profile:", profile);
return {
id: profile.id,
email: profile.email || profile.upn, // last part only for dummy accounts
name: profile.name,
image: profile.picture,
emailVerified: profile.email_verified,
createdAt: profile.created_at,
updatedAt: profile.updated_at,
};
},
4 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
How can it be configured?
19 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
5 hours of research (aka tears):
if you put in user.read in the scope the token will be issued for msgraph (The reason your access token’s aud (audience) claim is set to "00000003-0000-0000-c000-000000000000" is because this GUID represents the Microsoft Graph API.)
and add your api to the scope api://<your-client-id>/access_as_user
now i can get an accesstoken in nextjs for an app registration and call a azure resource with the accesstoken as bearer
19 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
make sure that you have offline_access in your token config and scope
19 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
19 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
i can post here anymore...
19 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
in your social provider
19 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
`
19 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
I managed to do this all on nextjs / prisma / hono project. Here are the pieces.
19 replies
BABetter Auth
•Created by sven09 on 4/13/2025 in #help
RefressAcceshToken in SocialProvider (Microsoft) and NextJs 15
I have solved it and will post it tomorrow as soon as i am back to my Computer
19 replies