Skip to content

Instantly share code, notes, and snippets.

@hiranya911
Created February 25, 2018 20:32
Show Gist options
  • Save hiranya911/426a1f4e83edae9b51b303f807d486fa to your computer and use it in GitHub Desktop.
Save hiranya911/426a1f4e83edae9b51b303f807d486fa to your computer and use it in GitHub Desktop.
import firebase_admin
from firebase_admin import auth
import flask
firebase_admin.initialize_app()
app = flask.Flask(__name__)
@app.route('/revoke', methods=['POST'])
def revoke_tokens():
uid = flask.request.form['uid']
# Revoke refresh tokens issued to the specified user.
auth.revoke_refresh_tokens(uid)
return flask.jsonify({'status': True})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment