How to use the session (cookie) of another site that was not set by flask

Asked

Viewed 16 times

0

I wonder if there is a way to use a cookie set by another site, in my application in flask with python.

I need to authenticate on a site that requires the A3 token, but I can’t capture this token via cookie because I need a backend validator on the site and I can’t even try a parse of some kind to try to authenticate manual.

What I imagined to try is a flask site, which uses the existing session using the cookie that is already stored in the browser. It’s possible to do something like this?

from flask import Flask, redirect, request, session, render_template

@app.route('/cookies/')
def cookies():
    return request.cookies

I am using something similar to this to check if the cookie was set, but I confess that I am well lost whether this is possible or not.

Thanks for your help.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.