Skip to content
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

TOPIC: 認証 API #26

Merged
merged 62 commits into from
Aug 26, 2024
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
66024e4
handler, service を用意
harsssh Aug 13, 2024
ce6c93b
SignIn の仮実装
harsssh Aug 17, 2024
e0d6008
env 読み込み、Auth Handler の登録
harsssh Aug 17, 2024
cefb8f1
localhost -> 127.0.0.1
harsssh Aug 17, 2024
8afa0e2
handler SignIn
harsssh Aug 17, 2024
380322b
コンテナの外部からのリクエストを listen できてなかった
harsssh Aug 18, 2024
b7998fe
enum OAuthProvider の変換処理
harsssh Aug 18, 2024
a217a76
mount read only
harsssh Aug 18, 2024
bb15da8
Set-Cookie が返せていなかった
harsssh Aug 18, 2024
320aa03
auth service のテスト
harsssh Aug 18, 2024
cf1cc0e
gomock で auth handler をテスト
harsssh Aug 18, 2024
fc781bc
Go Test CI
harsssh Aug 18, 2024
31999cd
Merge pull request #22 from EringiShimeji/auth/handler
harsssh Aug 21, 2024
d8ea5ab
service に callback のインターフェースを定義
harsssh Aug 18, 2024
1f0f45f
todo comment
harsssh Aug 18, 2024
237fc83
state の検証
harsssh Aug 18, 2024
d37963f
mockgen 周りのリファクタ、OAuthClient の定義
harsssh Aug 18, 2024
43c6d1d
OAuthClientImpl
harsssh Aug 20, 2024
3986d26
go generate CI
harsssh Aug 20, 2024
7abade3
OAuthClientImpl を注入
harsssh Aug 20, 2024
190ba28
GitHub の User ID を取得できるように
harsssh Aug 20, 2024
cac4f77
ユーザー作成処理の仮実装
harsssh Aug 20, 2024
2462d32
ユーザー作成処理の手直し
harsssh Aug 20, 2024
791e49f
gorm connection ctor
harsssh Aug 20, 2024
8d1cc08
gorm model の定義
harsssh Aug 20, 2024
259edec
user repository の実装
harsssh Aug 20, 2024
b067737
adminer コンテナ
harsssh Aug 21, 2024
a456291
session model を定義
harsssh Aug 21, 2024
4c53b0c
session domain model, repository の定義
harsssh Aug 21, 2024
a28a110
add comment
harsssh Aug 21, 2024
ca4c581
ISessionRepository を使った実装, Save は採番された ID をセットする
harsssh Aug 21, 2024
66be41b
SessionRepository 実装、注入
harsssh Aug 21, 2024
9165564
UserRepository の Save をリファクタ
harsssh Aug 21, 2024
ac13448
callback handler を実装
harsssh Aug 21, 2024
799bfc9
go generate
harsssh Aug 21, 2024
0e5adf8
CI 依存パッケージの install
harsssh Aug 21, 2024
0c9ca22
/auth/callback の route を追加
harsssh Aug 21, 2024
8b36adc
callback で読み取る cookie の名前が間違ってた
harsssh Aug 26, 2024
0103b29
callback の path 変えた
harsssh Aug 26, 2024
3bcdf76
リクエストを受けたらログを表示
harsssh Aug 26, 2024
83fed89
Merge pull request #25 from EringiShimeji/auth/callback
harsssh Aug 26, 2024
18ff583
Auth Service にセッションの検証を実装
harsssh Aug 26, 2024
6f1a7cd
SignInStatus の追加, buf generate
harsssh Aug 26, 2024
0a5603b
セッションIDが振られていたら, ALREADY_SIGNED_IN を返す
harsssh Aug 26, 2024
096535e
go generate
harsssh Aug 26, 2024
eb454eb
Merge pull request #29 from EringiShimeji/auth/check-already-signed-in
harsssh Aug 26, 2024
a7d7b69
protected かどうかを判別する MethodOption を追加
harsssh Aug 26, 2024
267fec1
cookie の path の指定を忘れてた
harsssh Aug 26, 2024
3a841a6
必要に応じて interceptor でログイン状態を確認する
harsssh Aug 26, 2024
1e143bd
format proto
harsssh Aug 26, 2024
8036eaf
Merge pull request #30 from EringiShimeji/auth/auth-interceptor
harsssh Aug 26, 2024
91719f8
依存オブジェクトの生成周りのリファクタ
harsssh Aug 26, 2024
8b96f6f
一定時間ごとに期限切れのセッションを削除するジョブを実行
harsssh Aug 26, 2024
9de61e0
go generate
harsssh Aug 26, 2024
d3c98f5
Merge pull request #31 from EringiShimeji/auth/session-cleanup
harsssh Aug 26, 2024
608d25d
empty
harsssh Aug 26, 2024
bee5118
Auth Service の入出力の SessionID を uuid.UUID に
harsssh Aug 26, 2024
4109be4
Auth Service SignOut
harsssh Aug 26, 2024
dbcb0e8
Auth Handler SignOut
harsssh Aug 26, 2024
5e71b02
go generate
harsssh Aug 26, 2024
5212dbc
ci を修正
harsssh Aug 26, 2024
351249c
Merge pull request #32 from EringiShimeji/auth/signout
harsssh Aug 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
callback の path 変えた
harsssh committed Aug 26, 2024
commit 0103b291dad846336e794201b97d9cdb8262322f
2 changes: 1 addition & 1 deletion backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
JWT_SECRET=sudoku_secret
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
OAUTH_REDIRECT_URI=http://127.0.0.1:3000/auth/callback
OAUTH_REDIRECT_URI=http://127.0.0.1:3000/auth/github/callback
2 changes: 1 addition & 1 deletion backend/app/server/route/register.go
Original file line number Diff line number Diff line change
@@ -40,5 +40,5 @@ func Register(mux *http.ServeMux) {

// register handlers
mux.Handle(authv1connect.NewAuthServiceHandler(authHandler))
mux.HandleFunc("/auth/callback", authCallbackHandler.Handle)
mux.HandleFunc("/auth/github/callback", authCallbackHandler.Handle)
}