-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable session sharing between GV and OSF #227
base: develop
Are you sure you want to change the base?
Conversation
fixed shared session issues and hmac auth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One potential optimization, but overall looks good to me.
UserReference.objects.get_or_create(user_uri=_user_uri) | ||
request.session["user_reference_uri"] = _user_uri | ||
if not request.session.get("user_reference_uri"): | ||
request.session["user_reference_uri"] = _user_uri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to get_or_create the UserReference if it's already on the session? Might be able to save a db call here if not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably you still do need to do that, as I think about it more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to run the scenario in my mind, I think we do. Here a potential scenario immediately after deployment to prod:
- A logged out user logs into OSF,
user_reference_uri
is set on the shared session - User (now authenticated) then makes a call to GV, at this point a
UserReference
instance is not yet created for this user on the GV side
No description provided.