I want to develop an Android app, which stores results in a database.
This database I have created using Django, and because I want to keep it simple for the users, I enabled OpenID. So the user can log in with their normal Google account.
The idea is that eventually, users should also be able to add items to the database from a website. So just creating random user names and passwords does not work.
I have now created an Activity with a webview, which allows the user to log into the website using OpenID. It then captures the sessionid, and my idea was to use this sessionid, to then grab urls which require the user to be logged in.
However, that does not seem to work.
I have already added @csrf_exempt to all those views. But now, when I try to get the page, I get something which has the title “OpenID transaction in progress”
What should I do in order to get the true results?
OK, after some more checking in Chrome, I also noticed the Cookie header.
Apparently, you need to send the sessionid in both a cookie and in the header as a cookie header.
Then everything works!