https://supertokens.com/ logo
Title
c

C9WIN

11/30/2022, 9:33 PM
Hello, sorry to be a bother. I am setting up a 3rd party solution, and I have the button, can then get to the provider, sign in, and come back. This is where I am stuck. I can't figure out what I should come back to. No matter what I seem to do I just end up back on the signin page. Do I need to make a new express route to come back to and somehow set the login there? Or is there a specific supertoken url I'm supposed to come back to? I tried
[url]/auth/callback/[id]
along with many others. Nothing seems to run the
getProfileInfo
function or any other function I can find.
r

rp

12/01/2022, 3:52 AM
Hey!
@C9WIN
That path is the correct one. The auth-react SDK should capture that path if you have added a provider in the providers list with that id
And assuming that you are using our pre built ui and are able to see the ui on the /auth screen.
c

C9WIN

12/01/2022, 5:06 AM
Hi @rp! Appreciate the response. Ok, just set it back to the
/auth/callback/[id]
url. And when it comes back from the provider, I just end up on the auth login page with "Something went wrong. Please try again." and in the url it shows
http://localhost:3000/auth?rid=thirdpartyemailpassword&error=signin
. I do have the same id on the front end and back end.
recipeList: [
    ThirdPartyEmailPassword.init({
      signInAndUpFeature: {
        providers: [
          Google.init(),
          {
            id: "steam",
            name: "steam", // Will display "Continue with X"
      
            // optional
            // you do not need to add a click handler to this as
            // we add it for you automatically.
            buttonComponent: <div style={{
                cursor: "pointer",
                border: "1",
                paddingTop: "5px",
                paddingBottom: "5px",
                borderRadius: "5px",
                borderStyle: "solid"
            }}>Continue with Steam</div>
        }
        ],
      },
    }),
^ front end
then backend looks similar with starting with google, then
id: "steam",
for the next portion. Which, it is grabbing to send to steam and back. But erroring out when it gets back. Just my guess is that its cause
getProfileInfo
is never running so there is no id passed back.
r

rp

12/01/2022, 5:11 AM
does it call the signinup API call when you are redirected back to the app?
If yes, whats the status code of that call?
c

C9WIN

12/01/2022, 5:15 AM
I am not sure? I've set breakpoints all over that section of code in the backend express but none of them ever trigger. Its like once its coming back I don't know where its going.
r

rp

12/01/2022, 5:15 AM
can you see the network tab on chrome?
do you see that API call being made?
And also, the callback for
steam
should be
/auth/callback/steam
- is that the URL you are using?
c

C9WIN

12/01/2022, 5:18 AM
re: url, it is ya
openid.return_to: http://localhost:3000/auth/callback/steam
r

rp

12/01/2022, 5:19 AM
right. That seems fine
c

C9WIN

12/01/2022, 5:19 AM
about api called, I dont think so. I see one that starts with this
http://localhost:3000/auth/callback/steam?openid.ns=http%3A%2F%2Fspecs.openid.net%...
but nothing with signupapi
r

rp

12/01/2022, 5:20 AM
hmm. Does google login work?
c

C9WIN

12/01/2022, 5:20 AM
ya
r

rp

12/01/2022, 5:20 AM
ok so nothing fundamentally wrong with the setup then
whats the callback URL that steam generates when redirecting you back to the app?
So basically whats the whole URL that you pasted above?
c

C9WIN

12/01/2022, 5:21 AM
yes that one but its long with all the attributes i'd want
r

rp

12/01/2022, 5:21 AM
can you send it here?
or DM is to me?
The
http://localhost:3000/auth/callback/steam?openid.ns=htt....
url
c

C9WIN

12/01/2022, 5:22 AM
guessing prob ok, but dm'd anyway
r

rp

12/01/2022, 5:22 AM
ok so it seems that the
code
query param is missing from the URL
which OAuth flow does steam follow?
c

C9WIN

12/01/2022, 5:23 AM
on their site it says "Steam's implementation is based upon OAuth 2.0."
tho i have seen talk about OpenID
r

rp

12/01/2022, 5:24 AM
yea.. i see. We can only work with authorisation code grant flow at the moment by default. You can customise your way through to making this work, but it wouldn't be simple
or you can wait until our next major release where we support this type of flow (1-1.5 months)
c

C9WIN

12/01/2022, 5:26 AM
Could I have the callback url go to a specific url that express could grab, append the code param, then forward to the front end /auth/callback/steam?
or maybe I should just wait if its coming that soon
r

rp

12/01/2022, 5:27 AM
you can. But how will you get the code param? Thats something steam needs to provide
c

C9WIN

12/01/2022, 5:27 AM
Ok, and am I correct that Twitter auth isn't possible at this time as well?
r

rp

12/01/2022, 5:28 AM
yea.. and that probably won't be possible until they support oauth 2.0. Right now, they only allow oauth 1.0
c

C9WIN

12/01/2022, 5:29 AM
Ok cool. Is there a github issue or some way I can follow along with openid?
or is it for sure just next major release
r

rp

12/01/2022, 5:29 AM
so when this closes, you can use the latest versions of the frontend / backend SDKs, and then the flow should work
c

C9WIN

12/01/2022, 5:30 AM
Ok cool, thank you so much. So, theoretically I should just keep my code the way it is and potentially in 1-1.5 months it could just work?
r

rp

12/01/2022, 5:31 AM
yea. There will be breaking changes to the code, so you might need to change a few things, but yea.. overall it should just work after
c

C9WIN

12/01/2022, 5:31 AM
perfect. I really appreciate youre time rp. Thank you for providing some insight.
r

rp

12/01/2022, 5:35 AM
hey @C9WIN
can we get your client ID / secret for testing purposes for steam login? You can change them after - would help us to confirm that the new flow works
hey @C9WIN please try this flow instead: https://partner.steamgames.com/doc/webapi_overview/oauth
the flow you are currently trying is not an OIDC / OAuth flow.
the link i sent above gives you a client ID and secret using which our current implementation should work
@sattvikc can help here
c

C9WIN

12/01/2022, 7:07 AM
Thanks. I believe this is deprecated for openid and this document old.
s

sattvikc

12/01/2022, 7:08 AM
hey @C9WIN , what we support is openid connect (which is an extension of oauth 2) however, steam seems to be using openid 2.0, which is a deprecated protocol. I'll see if there is a way we can make this work and get back to you
c

C9WIN

12/01/2022, 7:09 AM
Ah, gotcha. Thank you!
s

sattvikc

12/01/2022, 7:15 AM
https://hub.docker.com/r/imperialplugins/steam-openid-connect-provider - I see there is a docker service that can make steam openid compliant. could you try this?
I mean openid connect compliant
c

C9WIN

12/01/2022, 7:19 AM
I haven't really used docker much. Would this be something I would set up on my server and route it through every time?
s

sattvikc

12/01/2022, 7:19 AM
yes
this is how the flow might look like: your site -> imperial plugin service -> steam -> login -> imperial plugin service -> your site
c

C9WIN

12/01/2022, 7:25 AM
Ah, ok. thanks!
s

sattvikc

12/01/2022, 7:28 AM
pleasure! 🙂