-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Sign in for Python backend #228
Comments
I don't think we should overload the README.md with this because not everyone will use Python. Feel free to create a PR for this. |
For Flask: from urllib import parse
from flask import Flask, Response, request, redirect
ANDROID_PACKAGE_ID = "YOUR_PACKAGE"
@app.route('/callbacks/sign_in_with_apple', methods=['POST'])
def apple_login():
if request.method == 'POST':
try:
return redirect(f'intent://callback?{parse.urlencode(request.form.to_dict(flat=True))}#Intent;package={ANDROID_PACKAGE_ID};scheme=signinwithapple;end', code=307)
except Exception as e:
return Response(status=405)
else:
return Response(status=405)
# POST Error 405 Method Not Allowed |
For FastAPI:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quick python integration in READ.md will be really helpful!
Python Integration Example
And DONT forget to add accessToken attribute to credential otherwise it won't work:
The text was updated successfully, but these errors were encountered: