Skip to content

Commit

Permalink
Fixed cookie issue; fixed migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jul 22, 2024
1 parent 9c97a1b commit d91c6a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions migrations/versions/ac9a61050c66_initial_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"""
from alembic import op
import sqlalchemy as sa
from orcidflask.models import EncryptedValue


# revision identifiers, used by Alembic.
Expand All @@ -21,8 +22,8 @@ def upgrade():
op.create_table('token',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('userId', sa.String(length=80), nullable=False),
sa.Column('access_token', orcidflask.models.EncryptedValue(), nullable=False),
sa.Column('refresh_token', orcidflask.models.EncryptedValue(), nullable=False),
sa.Column('access_token', EncryptedValue(), nullable=False),
sa.Column('refresh_token', EncryptedValue(), nullable=False),
sa.Column('expires_in', sa.Integer(), nullable=False),
sa.Column('token_scope', sa.String(length=80), nullable=False),
sa.Column('orcid', sa.String(length=80), nullable=False),
Expand Down
2 changes: 1 addition & 1 deletion orcidflask/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
app.config['orcid_register_url'] = base_url + '/oauth/authorize?client_id={orcid_client_id}&response_type=code&scope={scopes}&redirect_uri={redirect_uri}&family_names={lastname}&given_names={firstname}&email={emailaddress}&show_login=false'
app.config['orcid_token_url'] = base_url + '/oauth/token'
app.config['SAML_PATH'] = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'saml')
app.config["SESSION_COOKIE_DOMAIN"] = app.config["SERVER_NAME"]
app.secret_key = app.config['SECRET_KEY']

postgres_user = os.getenv('POSTGRES_USER')
postgres_pwd = os.getenv('POSTGRES_PASSWORD')
postgres_db_host = os.getenv('POSTGRES_DB_HOST')
Expand Down

0 comments on commit d91c6a8

Please sign in to comment.