Skip to content
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

Get user info from session #193

Open
yn-coder opened this issue Aug 1, 2018 · 4 comments
Open

Get user info from session #193

yn-coder opened this issue Aug 1, 2018 · 4 comments

Comments

@yn-coder
Copy link

yn-coder commented Aug 1, 2018

I've follow the #74 and your manual and now use the flask.session in my simple flask app with Windows,Live auth.

Can I retrieve the user information from {{session}} object?

@mrichar1
Copy link
Member

After several years of inactivity, authomatic is now under community management, and we have just released a new stable version (1.0.0).

We are now reviewing all issues and PRs and hoping to begin work to solve as many of these as possible.

We are keen to find out which issues still apply, and which PRs are still required/are likely to merge cleanly into the current code. We are aiming to review them all, but any help with prioritisation would be very useful!

If you are still interested in having this issue/PR resolved, or are able to help us work on it, please reply to this message. That way we know which issues are most important to the community.

@yn-coder
Copy link
Author

Yes, go on please

@mrichar1
Copy link
Member

mrichar1 commented Dec 3, 2019

I've had a brief look at this, and I'm trying to get a bit more of an idea about what you are trying to do...

You say you want to retrieve info from the session object - if you mean the Flask.session object then this behaves like a dictionary, so should be easy to introspect.

Otherwise, if you want the results of authentication/authorisation, then you want something like:

result = authomatic.login(
   WerkzeugAdapter(request, response),
   provider_name,
   session=session,
   session_saver=lambda: app.save_session(session, response)
)
print(result.user.keys())

Is this what you mean?

@mrichar1 mrichar1 added this to New: Needs Check in Issue-Management via automation Dec 3, 2019
@mrichar1 mrichar1 moved this from New: Needs Check to Todo: High Priority in Issue-Management Dec 3, 2019
@yn-coder
Copy link
Author

yn-coder commented Dec 8, 2019

Yes, this could help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issue-Management
  
Todo: High Priority
Development

No branches or pull requests

2 participants