-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support additional authentication methods - Oauth #29
Open
CubicrootXYZ
wants to merge
32
commits into
pushbits:main
Choose a base branch
from
CubicrootXYZ:oauth-testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
0ecc411
testing
CubicrootXYZ de3f94f
remove testing
CubicrootXYZ 2c4400e
add PoC for oauth2
CubicrootXYZ b79b946
add password anmd user check
CubicrootXYZ a247db1
started moving oauth to current authentication
CubicrootXYZ 7c5ce31
integrate oauth in current auth
CubicrootXYZ 609eb66
move things again and introduce jwt tokens
CubicrootXYZ 6ee285d
move to authhandler
CubicrootXYZ 2dce377
get /auth to work properly
CubicrootXYZ e78ffda
stack authentication layers & add documentation
CubicrootXYZ f60bb83
add refresh config
CubicrootXYZ 46027e2
clean up & add file support
CubicrootXYZ fc6bc82
move token key to config & clean up
CubicrootXYZ 393d586
removed replaced code
CubicrootXYZ 69970e4
Merge branch 'pushbits:master' into oauth-testing
CubicrootXYZ cee8001
clean up errors
CubicrootXYZ 0504528
wording & consistency
CubicrootXYZ 364e522
panic when no oauth secrets are set
CubicrootXYZ a06fe24
clean up & consistency
CubicrootXYZ 1e2114b
register auth handler
CubicrootXYZ 43b2908
move to POST
CubicrootXYZ 48b4f71
added longterm tokens
CubicrootXYZ 5b0c124
use body data for auth
CubicrootXYZ 488f426
reflect changes in readme
CubicrootXYZ c92b783
let oauth use existing db
CubicrootXYZ 1a1ee00
Merge branch 'master' into oauth-testing
CubicrootXYZ a5e6472
clean up merge conflicts
CubicrootXYZ b226a5e
add missing package
CubicrootXYZ d98aa1c
lowercase errors
CubicrootXYZ bed622e
allow multiple oauth clients
CubicrootXYZ 4fe8d7f
Merge branch 'master' into oauth-testing
CubicrootXYZ 2c62a49
add ginserver again
CubicrootXYZ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is related to the separate sqlite file: What's the reason for switching to sqlx when we already have GORM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see now that it is integrated with oauth. Maybe we can investigate this further. Having two different databases increases complexity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very clean, but it is possible to use the same mysql database for auth and pushbits itself by just using the same credentials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I managed to improve that one step further - oauth now does not need any further storage information. If the main db is mysql, oauth uses just the same database and if it is sqlite3 it uses its own sqlite file.
Unfortunately I was not yet able to share the main sqlite with oauth. For that I'd need a sqlx object with the sqlite - which I am able to generate but it then runs in "command unknown" errors as soon as actions are performed on it.