I am attempting to extract an authorization code from an Oauth2 redirect URI.
I.E. once one of my users clicks allow on an Oauth2 consent form, they are redirected back to my indicated URL - but with an important authorization code in the parameters. For example:
http://localhost:5000/account?code=authorization_code
I know I can use Selenium Webdriver to grab the URL, but I have to eventually deploy this to my Linux server.
My question is, how can I pull the current user URL from the browser such that I can use it for my purposes?
(I am also open to other suggestions for how to approach this if there are better alternatives)
http://yourdomain/your_functionand then Google will redirect tohttp://yourdomain/your_function?code=authorization_codeand then you can get this code in your function.accountin your project@app.route('/account')and in this function you should get it withrequest.args.get('code')?code=authorization_code? if not thenget('code')givesNonebecause it can't findcode=in url.