I need help in setting up social login using Micro...
# ask-a-descoper
n
I need help in setting up social login using Microsoft
r
Hi @narrow-farmer-81585, Can you share please some more information about what are you trying to achieve and where do you need assistance?
n
I want , user on our site should be able to login through Microsoft login
r
Ok. are you using Descope Flows?
n
Yes, I have setup the redirect URL as http://localhost:8080/oauth2/callback/azure
After login I am getting redirect to errorHandler
not successHandler
can we have quick call, I can show you what I have done .
r
Can you share your error please?
n
not able to see Sign Button
r
I’ll try to check internally. Can you please share your
ProjectID
and the error you received?
n
P2Tmfst91nRKwmtwtx08GWmKFv2n
index-66387820.js:1 Uncaught (in promise) Error: flow-id cannot be empty
<Descope :flowId.prop="'sign-up-or-in'" :theme.prop="'dark'" :debug.prop="true" @error="handleError" @success="handleSuccess" />
r
There might be a mistake in the documentation. Can you please try using it like this:
Copy code
<Descope
        flowId="sign-up-or-in"
        @error="handleError"
        @success="handleSuccess"
    />
n
?descope-login-flow=sign-in%7C%23%7C2Tn9gsJSZSJYxVCNUuxUDtJ45Jt_4.end&err=OAuth+provider+disabled
I am getting this error
once I am redirected
Token exchange with OAuth provider failed, please validate your OAuth setup OAuth provider disabled Error
r
Can you check the method is enabled in your settings?
n
Got it, Thanks.
r
Cool we will make sure to update the docs 👍
n
Also I need one more help
When I put the redirect URL to frontend app, its working fine. While I want to redirect it to Backend App to check in our system if the user exists
How can I do that.
r
The redirect URL is meant for redirecting the client. Can you please give more information and explain your use case? Do you have users also in your app DB?
n
yes
We want to create our own token and refresh token, before redirecting the user to Home page
We are redirect to Backend app.
r
If there’s some additional info that you need you can use the HTTP connector to fetch that data in the flow from your backend and add that info to the Descope token. Otherwise you can redirect to a page that is not the Home page to handle that as well
n
But in AuthenticationInfo we are not getting user email
r
from the Microsoft login? maybe an email is not configured for this user in that provider.
n
How can I do that
r
We can look in it together. would you like to do a short session?
n
Can we do that now ?
r
Yes. sending you link in DM