Socket
Socket
Sign inDemoInstall

authentication

Package Overview
Dependencies
5
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    authentication

Learning authentication


Maintainers
1

Readme

Authentification blueprint package for flask

Blueprint defines object User who can register, log in, and log out. User can also update its profile. The data is stored on redis database.

Installing

To install a package, open the terminal and download the GitHub repository:

$  pip3 install --user git+https://github.com/kate-melnykova/authentication

The database for the package is redis, so please make sure that it is started prior to using the package.

Getting started

Create a python project with the following minimal structure

- templates
  -- base.html
- app.py

The file app.py creates a basic flask app and registers the blueprint

from flask import Flask
from authentication import auth

app = Flask(__name__, instance_relative_config=True)
app.register_blueprint(auth)

and base.html contains the base style:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        {% block form %}
        {% endblock %}
    </div>
</body>
</html>

Open the terminal and run

$ export FLASK_APP=app.py
$ flask run

The server will run the app. Note that only pages 'login', ' logout', 'register', and 'update_user' exist.

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc