mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: apply auth to container and cli client
This commit is contained in:
1 parent
030dc95e24
commit
0f53696f71
8 files changed
+64
-27
No files matched your search
@@ -1,13 +1,13 @@
|
||||
import { Router } from 'express'
|
||||
import passport from 'passport'
|
||||
|
||||
import { genJwt } from '../../utils/auth.js'
|
||||
import { genJWT } from '../../utils/auth.js'
|
||||
|
||||
const router = Router()
|
||||
|
||||
async function issueToken(req, res) {
|
||||
const { user } = req
|
||||
const token = await genJwt({
|
||||
const token = await genJWT({
|
||||
_id: user.id,
|
||||
username: user.username,
|
||||
email: user.email,
|
||||
|
||||
Reference in new issue
Block a user