Hi, i'm getting 404 when requesting authorisation url through website on local, but when i try the s...
a
Hi, i'm getting 404 when requesting authorisation url through website on local, but when i try the same url on postman it's working fine. any idea on how i can fix this?
r
Hey!
You can see the network request on the browser, copy it as curl and import it into postman
And then you can send a query via postman and do a manual diff between what’s working and what’s not
Probably some small mistake
Another approach is to enable backend debug logs and then send the query. See the logs for why it didn’t handle it
a
found it's due to a header value called
rid
being set to
thirdpartyemailpassword
. when i set this off, it works fine. this is the function that i currently use in the frontend to handle the login (got this from one of the example provided),
Copy code
onGooglePressed: async function () {
              const authUrl = await ThirdPartyEmailPassword.getAuthorisationURLWithQueryParamsAndSetState({
                  providerId: "google",
                  // This is where google should redirect the user back after login or error.
                  // This URL goes on the google dashboard as well.
                  authorisationURL: `${websiteDomain}/auth/callback/google`,
              });
              window.location.assign(authUrl);
          },
maybe i did my configuration wrong?
r
What recipes have you initialised on the backend and frontend? You have to have the same set in both
a
ah. i've initialised ThirdParty and Session in the backend but Session and ThirdPartyEmailPassword in the frontend. i'll change it to ThirdParty for both of them
it is working now. thank you sir.
r
Cool!
101 Views