Git Product home page Git Product logo

stormpath-flask-sample's Introduction

#Stormpath is Joining Okta We are incredibly excited to announce that Stormpath is joining forces with Okta. Please visit the Migration FAQs for a detailed look at what this means for Stormpath users.

We're available to answer all questions at [email protected].

stormpath-flask-sample

A sample Flask application which demonstrates how to successfully use Flask-Stormpath to handle user authentication and authorization for your web app.

Getting Started

To get started, you'll want to first clone this GitHub repository locally:

$ git clone https://github.com/stormpath/stormpath-flask-sample.git

Next, you'll want to go into the sample app directory:

$ cd stormpath-flask-sample

Then you'll want to install all of the Python requirements (via pip):

$ pip install -r requirements.txt

And lastly, you'll want to run the bootstrap.py script which will guide you the rest of the way:

$ python bootstrap.py

That's it! Got stuck? Just email us anytime: [email protected]

Screenshots

Here are some various screenshots of the application (and bootstrap script!), so you can get an idea of what you're in for :)

Installing Requirements

Boostrap Script

Running

Index Page

Registration Page

Dashboard Page

stormpath-flask-sample's People

Contributors

brentstormpath avatar nihil0 avatar rdegges avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stormpath-flask-sample's Issues

Keep entered email when registration info is invalid

This isn't a necessity, but keeping the email the user entered in the form when it is re-rendered would be a nice feature. It's something I intend to implement for my own app, and I'm not sure about the best way to go about it.

screen shot 2014-05-07 at 1 24 46 pm

Register and Log In yield IndexErro

When trying to Log In with credentials created inside Stormpath it yields IndexError

Traceback (most recent call last):
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/app.py", line 72, in register
    _user = stormpath_manager.application.accounts.create({
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/flask_stormpath.py", line 213, in application
    )[0]
  File "/Users/enriquemanuel/dev/stormpath-flask-sample/env/lib/python2.7/site-packages/stormpath/resources/base.py", line 349, in __getitem__
    return self.__dict__['items'][idx]
IndexError: list index out of range

Everything is installed and running correctly based on the bootstrap and also in the requirements.

Works with latest stormpath-flask?

When I run the sample app locally the login screen no longer looks like the screenshots. Seems it's using these (more recent and better looking) files from here:

venv/lib/python2.7/site-packages/flask_stormpath/templates/flask_stormpath/base.html

and NOT from here:

templates/base.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.