We do have push to github based on user access token
That is clunky user UX
I want full API access with user OAuth
Asked ChatGPT to brainstorm and see for a good solution and it proposed a pretty good one
Idea is as follows, add support to server side to do OAuth login/callback flow and get user token.
From options of where to store token, to keep it agnostic, use JWT to store it in cookies
So when user comes back github token is extracted from his cookie.
JWT tokens are encrypted so its safe.
It would allow things to work without databases.
Sharing here for discussion, if someone wantâs to give it a try and has experience in such flows, create a PR in repo so other see that it was picked up.
Link here.
Its to avoid duplicate work.
When we have such access we can do a lot, example of what you can do is in my video of connecting ChatGPT to GitHub in similar way
I have two way live sync with local folder and experiments with connecting to LM Studio from hosted version on my âroadmapâ before I get to integrations GitHub work.
GitHub, but 2-way, and image support are on the top of my list. I am trying to get an opening in my schedule to work on one or another, just not sure yet. But thanks for starting this post. If someone doesnât beat me to it again, I will let you know when I open a PR. Just donât want to commit until I remove some uncertainty in my schedule I will think about just improving just the auth first.
Happy to help as time allows⌠I was responsible for generic oauth support for source control on the Unity Cloud Build service, and there are some novel ways to use passportjs and other tools to generalize third-party auth. Letâs do it
Edit: For those consuming ottodev, maybe this is also just initial support for providing keys for services like Auth0 or self-hostable Authy. Spitballing for now!
I would be very frugal for now with 3rd party dependencies.
Just storing this in JWT should be perfect for current nature of the project.
But i am also for making that modular so we can select petsistance and auth regimes and providers.
Looks smooth. but I am thinking of experimenting with actual git protocol to clone repo. so that it can not only be used for github but any git repo.
just like git cli
its like using the git cli in terminal. platform agnostic. for public git down not need any auth, for private we can use basic auth to clone the repo. but still will will need the OAuth / personal token for situations like 2FA.
but with this we can list branches, tags make commits etc.
yes we can directly do github api. I was just thinking of we can make it work with github as well as platforms like gitlab or private git servers for self hosted git servers.
i am not sure if we can do that with github api
I tried isomorphic inside web container bit did not work. will try one more time. so trying to see if we can do it with frontend react hook