Redirect_uri issue with Apple using rest-social-auth Python library

139 Views Asked by At

I'm using rest-social-auth (https://pypi.org/project/rest-social-auth/) library to implement Oauth2 signup/ sign in using Google, and Apple. Well, when I tried to implemented it for Apple I've faced a problem with redirect_uri, the problem is as following: when Android client try to signup it raises 'invalid redirect_uri', I found this article (https://johncodeos.com/how-to-add-sign-in-with-apple-button-to-your-android-app-using-kotlin/) that says I should implement a callback endpoint on the server side (Note: he use Node.js) to handle the redirect_uri but in his code he redirect the response to the same endpoint:

returnURL = '?success=true' + code + clientSecret + firstName + middleName + lastName + email
res.redirect(returnURL)

My question is where should I redirect the request after I modify it on the server knowing that I still need some additional info from the client to send it to me in the body but they can't during the redirect_uri error?

0

There are 0 best solutions below