Skip to content

implement users #23

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

Closed
frnsys opened this issue Jan 28, 2014 · 9 comments
Closed

implement users #23

frnsys opened this issue Jan 28, 2014 · 9 comments

Comments

@frnsys
Copy link
Member

frnsys commented Jan 28, 2014

using flask-security

necessary for implementing oauth (see #22)

@frnsys
Copy link
Member Author

frnsys commented Jan 30, 2014

actually – it makes more sense to plug into an existing platform; i.e. use twitter to authenticate/user accounts. look at flask-social, which is built on flask-security.

@frnsys
Copy link
Member Author

frnsys commented Jan 30, 2014

there still needs to be a user model, to keep track of settings and user-specific data. to keep flexibility for other accounts, need to also keep track of which service the token belongs to.

so, need to save:

  • account type (e.g. twitter, facebook, google, email)
  • email (if possible to pull from these account providers)
  • token

@ferristseng
Copy link
Contributor

i'm having problems with flask-social which depends on python-oauth2. unfortunately, python-oauth2 doesn't work with python 3.3 it seems.

joestump/python-oauth2#147

Downloading/unpacking oauth2 (from Flask-OAuth>=0.12->Flask-Social==1.6.2->-r requirements.txt (line 6))
  Downloading oauth2-1.5.211.tar.gz
  Running setup.py egg_info for package oauth2
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/Users/ferristseng/.virtualenvs/cpython333/build/oauth2/setup.py", line 18
        print "unable to find version in %s" % (VERSIONFILE,)
                                           ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/Users/ferristseng/.virtualenvs/cpython333/build/oauth2/setup.py", line 18

    print "unable to find version in %s" % (VERSIONFILE,)

                                       ^

SyntaxError: invalid syntax

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /Users/ferristseng/.virtualenvs/cpython333/build/oauth2
Storing complete log in /Users/ferristseng/.pip/pip.log

@frnsys
Copy link
Member Author

frnsys commented Jan 30, 2014

hm we may have to roll our own with https://github.com/lepture/flask-oauthlib

@frnsys
Copy link
Member Author

frnsys commented Jan 31, 2014

foundational work here:
#27

@frnsys
Copy link
Member Author

frnsys commented Jan 31, 2014

I started adding in the oauth flows for authentication via google, twitter, and facebook. Haven't yet had a chance to test them:
7749179

frnsys pushed a commit that referenced this issue Feb 4, 2014
…conflict, built out user oauth routes, closes #30 and #23
@frnsys
Copy link
Member Author

frnsys commented Feb 4, 2014

closed via 61c8f4d

@frnsys frnsys closed this as completed Feb 4, 2014
@frnsys
Copy link
Member Author

frnsys commented Feb 4, 2014

@ferristseng when you get a chance can you take a look and let me know what you think? mainly at the encryption of oauth token secrets/where those config values are stored. do you think they should be in base_security because they are related to security, although they aren't explicitly related to the flask-security package?

@ferristseng
Copy link
Contributor

it's probably better the way you have it. the only advantage to putting it in base_security, would be if you needed in the global context for the Flask app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants