import os
from dotenv import load_dotenv

from flask_oidc import OpenIDConnect

oidc = OpenIDConnect()
load_dotenv()

def init_auth(app):
    app.config.update({
        'SECRET_KEY': os.getenv('SECRET_KEY'),
        'OIDC_CLIENT_SECRETS': 'client_secrets.json',
        'OIDC_SCOPES': ['openid', 'email', 'profile'],
        'OIDC_INTROSPECTION_AUTH_METHOD': 'client_secret_post',
    })
    oidc.init_app(app)
