hey, I am having trouble registering with facebook...
# general
a
hey, I am having trouble registering with facebook, I am able to do so with google
Copy code
interface conversion: interface {} is nil, not string
/home/alishavirani/go/pkg/mod/github.com/getsentry/sentry-go@v0.13.0/gin/sentrygin.go:72 (0xc10367)
        (*handler).recoverWithSentry: panic(err)
/usr/local/go/src/runtime/panic.go:838 (0x436ec6)
        gopanic: done = runOpenDeferFrame(gp, d)
/usr/local/go/src/runtime/iface.go:262 (0x40ace9)
        panicdottypeE: panic(&TypeAssertionError{iface, have, want, ""})
/home/alishavirani/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.6.4/recipe/thirdparty/providers/facebook.go:82 (0xc62024)
        Facebook.func1.1: ID := userInfo["id"].(string)
/home/alishavirani/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.6.4/recipe/thirdparty/api/implementation.go:134 (0xc5e81d)
        MakeAPIImplementation.func2: userInfo, err := providerInfo.GetProfileInfo(accessTokenAPIResponse, userContext)
/home/alishavirani/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.6.4/recipe/thirdpartyemailpassword/api/implementation.go:106 (0xc73ee2)
        MakeAPIImplementation.func6: response, err := ogSignInUpPOST(provider, code, authCodeResponse, redirectURI, options, userContext)
s
@alisha can you share the Init ?
a
request```{ "code": "code from fb", "thirdPartyId": "facebook", "redirectURI": "http://localhost:3000/auth/callback/facebook" }```
s
it seems like the get profile is failing on the fb API call, are u sure the configuration between frontend and backend is matching ?
@alisha we could get on a call to debug this
a
sorry got occupied on something else, will check what creds are there on FE in sometime
s
okay
a
I think the FE and BE config is correct
a could will be helpful
I am available for a call after 3pm today, does that work for you ?
@rp can you help me here
r
hey!
Still facing the fb login issue?
@sattvikc please help out
s
@alisha let me know a good time to call
a
I am available for a call now
r
ok sending a link
Join Zoom Meeting https://us06web.zoom.us/j/84451561319?pwd=d0JhZXZSZUNablB3ZmlNRE5TdjJNQT09 Meeting ID: 844 5156 1319 Passcode: 782473 One tap mobile +13017158592,,84451561319#,,,,*782473# US (Washington DC) +13126266799,,84451561319#,,,,*782473# US (Chicago) Dial by your location +1 301 715 8592 US (Washington DC) +1 312 626 6799 US (Chicago) +1 346 248 7799 US (Houston) +1 669 900 6833 US (San Jose) +1 929 205 6099 US (New York) +1 253 215 8782 US (Tacoma) Meeting ID: 844 5156 1319 Passcode: 782473 Find your local number: https://us06web.zoom.us/u/kd1GHF8Ds2
a
thanks
s
joining..
r
hey @alisha
we found a bug in the golang SDK related to fb login. Will release a fix in a few hours.
a
hey sure, thanks
r
thanks for pointing this out.
hey @alisha
we have fixed the bug for fb sign in in v0.6.6. Please do try and feel free to let us know if the error persists. Thanks
a
thanks @rp will check and let you know
the error still persists
r
@sattvikc can you help?
s
yes
@alisha could u share the logs or stack trace?
a
``` interface conversion: interface {} is nil, not string /home/alishavirani/go/pkg/mod/github.com/getsentry/sentry-go@v0.13.0/gin/sentrygin.go:72 (0xc4dc07) (*handler).recoverWithSentry: panic(err) /usr/local/go/src/runtime/panic.go:838 (0x436ec6) gopanic: done = runOpenDeferFrame(gp, d) /usr/local/go/src/runtime/iface.go:262 (0x40ace9) panicdottypeE: panic(&TypeAssertionError{iface, have, want, ""}) /home/alishavirani/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.6.6/recipe/thirdparty/providers/facebook.go:82 (0xc801af) Facebook.func1.1: ID := userInfo["id"].(string) /home/alishavirani/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.6.6/recipe/thirdparty/api/implementation.go:134 (0xc7c9fd) MakeAPIImplementation.func2: userInfo, err := providerInfo.GetProfileInfo(accessTokenAPIResponse, userContext) /home/alishavirani/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.6.6/recipe/thirdpartyemailpassword/api/implementation.go:106 (0xc85f82) MakeAPIImplementation.func6: response, err := ogSignInUpPOST(provider, code, authCodeResponse, redirectURI, options, userContext)``
s
give me a min, let me check
seems like there is no user id in the fb response, could you call this manually and let me know the result: https://graph.facebook.com/me?fields=id,email&format=json&access_token=
a
Copy code
{
  "error": {
    "message": "Malformed access token AQDsqTUpG8yTGAKvtRoP7I3u_h0eEX4pAsZ0GMyvnYcyixDgdbYfVAlkLtf5mH2afARRch_9pX6mTUuRAkgU6XFpieX9hv4OjizLXbN5hy06lzKwQ4JndARBsDfY2x8TLiDQir1Y3ARmI18x1hYocupJ0Ny7J5jRZlC26u7gi0a_xOkYlApF1pVtZf5Bk8KSUXTcNKDKCZkpCyqEbXLZiDahLLeoL2c7FD0AfAAXugSWOHYYkyF5qrNV8qkW-4XbEe38DF3tcqCwD1O_V-ccxiKQTbWaC1s33PI3tXRzMtyXgUEQSjlG3BuxT--mCldTbF0NGEjk3apfZd7A4hkzvZKPi4bw9lurbB8UZtNulzbtrsudMUyvIsGbGroqDZYTcQQ",
    "type": "OAuthException",
    "code": 190,
    "fbtrace_id": "ABDwyP4hFUBtb7YgusJtNHy"
  }
}
s
just to re-confirm, did u you use accessToken and not code ?
otherwise, we might need to get on a call and debug to trace the issue.
a
oh sorry, I used code, from where do I get the access token? The signinup API is failing so I cant log the access token from the response
s
not to worry, there is another API to fetch access token from code... just a sec
a
brb
s
sure, meanwhile could u also share the scope?
a
back, scope is
"email", "public_profile", "openid"
s
scope seems file, maybe we could get on a call and debug this
@alisha pls do let me know a good time
a
tonight 8pm IST?
s
okay
I have actually tried with only email in the scope. Could you try that once?
a
trying
facing same error @sattvikc
s
alright, let's debug @ 8pm IST
@alisha To join the video meeting, click this link: https://meet.google.com/oux-bhza-ghj Otherwise, to join by phone, dial +1 260-897-1665 and enter this PIN: 708 222 522# To view more phone numbers, click this link: https://tel.meet/oux-bhza-ghj?hs=5
a
hey joining
checked the client id and secret, still doesn't seem to work
r
Hmmmm. Thatโ€™s odd. Fb says that the client secret is invalid
Can you intentionally give a wrong client secret and see if you get the same error?
a
yes will try that
i'll try and let you know tomorrow
r
Cool
a
hey it worked, looks like I was using the wrong client secret value, apologies for the same, thanks a lot for your help ๐Ÿ™‚
r
ok great!!
a
however it says on the server, do we need https on the server to get it working?
r
Yea. If you use the admin's (the person who created the app on db) account to login, then it allows you http. Else you have to use https
a
I am trying using the admin's account, it still gives the same error
fb dev settings
s
@alisha by "on server" do you mean production environment?
a
dev server
s
local ?
if you are using any other domain other than localhost, https is mandatory
a
qa/staging server
for all users including admin?
s
yes
a
okay, cool
will let you know when we have https added, thanks for the help ๐Ÿ™‚
s
just to confirm again, the complete login flow worked on the localhost right? (for the admin account)
a
yes it did
s
great!
4 Views