FAQ
Hi

I'm running into a problem with django loosing the current session, when I
redirect an AnnonymousUser to an facebook's oauth. I set a session
variable before sending a user to facebook to login via oauth. When they
get redirected back to my site, the session key changes and the data is
lost. Before the user is sent to facebook the session key
"ciwz7qboun03pcan42pn8jew3gaphcuh" exist in the db. When they return it
seems to be deleted and replaced by an empty one.

I'm intercepting the redirected request using debug tool bar and I can see
the following in the template context processor
"django.core.context_processors.debug"

{u'debug': True, u'sql_queries': [
{u'sql': u"SELECT `django_session`.`session_key`,
`django_session`.`session_data`, `django_session`.`expire_date` FROM
`django_session` WHERE (`django_session`.`session_key` =
'ciwz7qboun03pcan42pn8jew3gaphcuh' AND `django_session`.`expire_date`>
'2013-10-01 14:57:27' )", u'time': u'0.001'},
{u'sql': u"SELECT (1) AS `a` FROM `django_session` WHERE
`django_session`.`session_key` = 'vguth05jxwih234x0dwi8vao7xpw7s7r' LIMIT
1", u'time': u'0.000'},
{u'sql': u'SAVEPOINT s140077883270912_x1', u'time': u'0.000'},
{u'sql': u"INSERT INTO `django_session` (`session_key`, `session_data`,
`expire_date`) VALUES ('vguth05jxwih234x0dwi8vao7xpw7s7r',
'ZDQ5OWZmZmRmZmJkY2M2M2UyMDRmYjhlYTJlNTIzMzhjYzQ5NjQ5NDqAAn1xAS4=',
'2013-10-15 14:57:27')", u'time': u'0.000'},
{u'sql': u"SELECT `django_session`.`session_key`,
`django_session`.`session_data`, `django_session`.`expire_date` FROM
`django_session` WHERE `django_session`.`session_key` =
'vguth05jxwih234x0dwi8vao7xpw7s7r' ", u'time': u'0.001'},
{u'sql': u"SELECT `django_session`.`session_key`,
`django_session`.`session_data`, `django_session`.`expire_date` FROM
`django_session` WHERE `django_session`.`session_key` =
'vguth05jxwih234x0dwi8vao7xpw7s7r' ", u'time': u'0.000'}]}


If the user is already logged into my site, this doesn't happen.

Any suggestions or help would be greatly appreciated!

Thank you
Don



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6e31256c-9469-404d-a1f7-ebb9378930e8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-users @
categoriesdjango, python
postedOct 1, '13 at 3:24p
activeOct 1, '13 at 3:24p
posts1
users1
websitedjangoproject.com

1 user in discussion

Don Graham: 1 post

People

Translate

site design / logo © 2022 Grokbase