diff options
| author | Frederick Muriuki Muriithi | 2026-08-28 17:40:09 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-08-28 12:43:48 -0500 |
| commit | cdf3daefaa6b7870b2f36da440c59c327ea1d62f (patch) | |
| tree | c497dcef75fc64677664c6efba60b0baa76c8e4e /gn_auth/errors/authlib.py | |
| parent | 800913ddee45fcb0b0e3a9d8c3917d3cf9644ca4 (diff) | |
| download | gn-auth-cdf3daefaa6b7870b2f36da440c59c327ea1d62f.tar.gz | |
fix(jwt-bearer-token): use AUTH_DB instead of SQL_URI for user/client lookup
JWTBearerToken.__init__ was calling with_db_connection with app.config["SQL_URI"] (the GeneNetwork MariaDB URI) to look up the authenticated user and OAuth2 client. gn_libs.sqlite3.with_db_connection expects a SQLite file path, so passing a MySQL URI causes an OperationalError: unable to open database file every time a JWT is validated through require_oauth.acquire(). Use app.config["AUTH_DB"] (the gn-auth SQLite database) for both lookups. Also normalise the whitespace in the user lookup lambda while here. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>
Diffstat (limited to 'gn_auth/errors/authlib.py')
0 files changed, 0 insertions, 0 deletions
