feat: allow unlinking auth providers
This commit is contained in:
parent
8f6e280367
commit
b2bc608ec8
7 changed files with 201 additions and 4 deletions
|
@ -80,12 +80,15 @@ func Mount(srv *server.Server, r chi.Router) {
|
|||
r.Post("/signup", server.WrapHandler(s.discordSignup))
|
||||
// takes discord signup ticket to link to existing account
|
||||
r.With(server.MustAuth).Post("/add-provider", server.WrapHandler(s.discordLink))
|
||||
// removes discord link from existing account
|
||||
r.With(server.MustAuth).Post("/remove-provider", server.WrapHandler(s.discordUnlink))
|
||||
})
|
||||
|
||||
r.Route("/mastodon", func(r chi.Router) {
|
||||
r.Post("/callback", server.WrapHandler(s.mastodonCallback))
|
||||
r.Post("/signup", server.WrapHandler(s.mastodonSignup))
|
||||
r.With(server.MustAuth).Post("/add-provider", server.WrapHandler(s.mastodonLink))
|
||||
r.With(server.MustAuth).Post("/remove-provider", server.WrapHandler(s.mastodonUnlink))
|
||||
})
|
||||
|
||||
// invite routes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue