glauth-ui icon indicating copy to clipboard operation
glauth-ui copied to clipboard

Include an OAuth server

Open traverseda opened this issue 4 years ago • 7 comments

Is that a feature you'd be interested in including in this project? The lepture/authlib project looks like it would be a good place to start. A lot of apps are able to get user data from OAuth, and covering both LDAP and OAuth covers a large segment of potential downstream apps.

It would also be nice to support OpenID Connect once authlib's support for it is in stable.

traverseda avatar Apr 03 '21 21:04 traverseda

Great Idea tho i have no experience with it yet. I definitely want to clean up everything else first and integrate all glauth features.

sonicnkt avatar Apr 04 '21 07:04 sonicnkt

Well that's why I was asking if it was a feature you'd be interested in. I'll take a crack at it.

traverseda avatar Apr 04 '21 14:04 traverseda

please go ahead :) having something integrated upon my own code would be great. Like i said in the readme, this is a bit of a learning project for me so if you can please add a lot of comments ;)

sonicnkt avatar Apr 04 '21 15:04 sonicnkt

I've been working on converting https://github.com/authlib/example-oidc-server into a blueprint this app can use.

This work is taking place here: https://github.com/traverseda/glauth-ui/tree/OpenId

I'm think I've got the basic routing and stuff working, but I'm having a bit of trouble getting database migrations to work. I don't have a lot of experience with docker and I don't have a good workflow for running the migration generator in docker and getting the results back in to the git repo.

Sorry for the relative lack of comments, but at this point I am just bringing in the example app.

traverseda avatar Apr 05 '21 15:04 traverseda

I'm think I've got the basic routing and stuff working, but I'm having a bit of trouble getting database migrations to work. I don't have a lot of experience with docker and I don't have a good workflow for running the migration generator in docker and getting the results back in to the git repo.

Why do you have to run the migration generator in docker (flask db migrate)? As far as i thought you can create those in your dev environment and then docker will migrate its db using the flask db upgrade command in boot.sh if its not the latest version.

But i had some problems with this before even without docker which were related to sqlite. Hope i have some time tomorrow to check out you work.

sonicnkt avatar Apr 05 '21 19:04 sonicnkt

I'm pretty consistently getting sqlite3.OperationalError: unable to open database file when I try to run it outside of docker.

I set SQLALCHEMY_DATABASE_URI to sqlite:////tmp/test.db and it's still happening. Not sure what's up with that, but it does seem to need to be able to read the existing db in order to make migrations.

traverseda avatar Apr 05 '21 21:04 traverseda

Hmm is this in absolute path? My development db is in a db subfolder of my venv like in docker so im just using the default values..

sonicnkt avatar Apr 06 '21 09:04 sonicnkt