Hi all, I follow this blog to have the custom ui w...
# general
s
Hi all, I follow this blog to have the custom ui with super token. https://supertokens.com/blog/adding-social-login-to-your-website-with-supertokens But the the token is not saved in cookies. After the signinup call. Can any one give the working example. Thanks
r
hey @santhosh
Can you enable debug logs on the backend and frontend and show me all of them when you make the signinup API call?
s
Actually using the supertoken UI. It's sets up the access token in cookies. But using custom UI without using super token UI. It's not setting.
Just i had one button for Google sign-in. Then I followed step 1 and step2.
Both steps are successful. But access token is not saved in cookies
r
are you using axios?
s
No
r
if yes, rememebr to add the axios interceptors
then you will need to enable logging and show me the logs
only then i can help
s
I changed to axios. I did use interceptors for request and response.
Same issue.
You were asking for the log
r
can you please enable debug logs and show me the output?
it will be easier
s
Hey @rp I have added withCredentials as true in axios.create
It's working fine now
r
i see. okay! that should have been added on it's on if the interceptor was being applied
so if you had to add it, it probably means that the interceptor was not being applied
s
Yes
Google login working fine. But apple login throwing issue
Error: token used before issued Status: field_error
r
Apple is sending that resposne
s
This error coming while using signinup
Oh
Actually we use default supertoken credentials in backend
For the apple account
r
are you using golang?
s
Yes
where are you running the golang server?
on your local machine?
s
Local
r
are you sure you have no clock skew issue on your local machine?
the time on your local machine is correct?
s
May be 30 sec plus or minus
Will that affect as well
r
That is a BIG skew.
that would definitely cause all sorts of issues
s
Now it's working good after changing to rite time
But google sign-in working fine with 30 sec delay
Why it's not working for apple
r
cause with google sign in, we don't use the ID token they send and instead query them diectly using their access token
with apple sign in, we use their ID token directly to extract user info. The ID token is a JWT which is verified before use
since your time was 30 seconds off, the verification of the JWT failed
which threw this error
s
Ok
Thanks for your expertise here. It really helps.
r
happy to help πŸ™‚
s
One more question related to ui.
r
Sure
s
After the signinup and verify call. How to remove the auth/callback/apple in the URL. Just it should load localhost:3000
r
i don't understand your question
s
After the url redirection from sign in, code will be to the browser url.
r
yup
from the auth provider or from the page within the app that calls /signinup?
s
Signinup
r
that should not happen
s
After this call we ll call verify
r
or maybe i still don't understand your quesiton
s
Actually i check the supertoken demo app. Once after Google sign-in, application with redirect to web app url with code
Using the code signinup API with ll be called
After that browser removed the excess path with code
It ll be having only localhost:3000
r
yea..
s
My question is how to do remove the excess path and just load localhost:3000
r
That’s just a regular browser redirect
You can google that πŸ˜…
s
Ya i got it way before. Since I asked you before. I explained it. πŸ˜‚
Cool