mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-15 09:59:09 +00:00
finish rudimentary auth flow
This commit is contained in:
parent
90f302c103
commit
cfc623b228
10 changed files with 101 additions and 15 deletions
|
@ -51,6 +51,10 @@ module.exports = (R, $) => {
|
|||
})
|
||||
|
||||
R.get('/api/auth/redirect', ctx => {
|
||||
ctx.redirect($.discord.getAuthUrl())
|
||||
ctx.body = { url: $.discord.getAuthUrl() }
|
||||
})
|
||||
|
||||
R.post('/api/auth/logout', ctx => {
|
||||
ctx.session = null
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue