diff --git a/migrations/versions/ac9a61050c66_initial_migration.py b/migrations/versions/ac9a61050c66_initial_migration.py index a383c8f..113afe1 100644 --- a/migrations/versions/ac9a61050c66_initial_migration.py +++ b/migrations/versions/ac9a61050c66_initial_migration.py @@ -7,6 +7,7 @@ """ from alembic import op import sqlalchemy as sa +from orcidflask.models import EncryptedValue # revision identifiers, used by Alembic. @@ -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), diff --git a/orcidflask/__init__.py b/orcidflask/__init__.py index 1e3bb0d..089cb01 100644 --- a/orcidflask/__init__.py +++ b/orcidflask/__init__.py @@ -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')