Hello, sorry to be a bother. I am setting up a 3rd party solution, and I have the button, can then g...
c
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
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
Hi @rp_st! 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.
Copy code
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
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
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
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
re: url, it is ya
openid.return_to: http://localhost:3000/auth/callback/steam
r
right. That seems fine
c
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
hmm. Does google login work?
c
ya
r
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
yes that one but its long with all the attributes i'd want
r
can you send it here?
or DM is to me?
The
http://localhost:3000/auth/callback/steam?openid.ns=htt....
url
c
guessing prob ok, but dm'd anyway
r
ok so it seems that the
code
query param is missing from the URL
which OAuth flow does steam follow?
c
on their site it says "Steam's implementation is based upon OAuth 2.0."
tho i have seen talk about OpenID
r
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
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
you can. But how will you get the code param? Thats something steam needs to provide
c
Ok, and am I correct that Twitter auth isn't possible at this time as well?
r
yea.. and that probably won't be possible until they support oauth 2.0. Right now, they only allow oauth 1.0
c
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
so when this closes, you can use the latest versions of the frontend / backend SDKs, and then the flow should work
c
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
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
perfect. I really appreciate youre time rp. Thank you for providing some insight.
r
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
Thanks. I believe this is deprecated for openid and this document old.
s
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
Ah, gotcha. Thank you!
s
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
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
yes
this is how the flow might look like: your site -> imperial plugin service -> steam -> login -> imperial plugin service -> your site
c
Ah, ok. thanks!
s
pleasure! 🙂
65 Views