forked from fastapi/full-stack-fastapi-template
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- New feature: magic (email-based) login, with password fallback - New feature: Time-based One-Time Password (TOTP) authentication - Security enhancements to improve consistency, safety and reliability of the authentication process (see full description in the frontend app) - Refactoring of `login` APIs - Requires one new `frontend` dependency: [QRcode.vue](https://github.com/scopewu/qrcode.vue)
- Loading branch information
Showing
62 changed files
with
1,596 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...ecutter.project_slug}}/backend/app/alembic/versions/8188d671489a_deeper_authentication.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""Deeper authentication | ||
Revision ID: 8188d671489a | ||
Revises: c4f38069dc24 | ||
Create Date: 2023-01-01 15:31:40.986707 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '8188d671489a' | ||
down_revision = 'c4f38069dc24' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('user', sa.Column('created', sa.DateTime(), server_default=sa.text('now()'), nullable=False)) | ||
op.add_column('user', sa.Column('modified', sa.DateTime(), server_default=sa.text('now()'), nullable=False)) | ||
op.add_column('user', sa.Column('totp_secret', sa.String(), nullable=True)) | ||
op.add_column('user', sa.Column('totp_counter', sa.Integer(), nullable=True)) | ||
op.alter_column('user', 'hashed_password', | ||
existing_type=sa.VARCHAR(), | ||
nullable=True) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('user', 'hashed_password', | ||
existing_type=sa.VARCHAR(), | ||
nullable=False) | ||
op.drop_column('user', 'totp_counter') | ||
op.drop_column('user', 'totp_secret') | ||
op.drop_column('user', 'modified') | ||
op.drop_column('user', 'created') | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.