Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
astro-oidc-middleware
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fbed7b0c
authored
2024-05-03 16:30:15 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Tweaks to the /token paths.
1 parent
d7be2e0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/oidc-middleware.mjs
src/oidc-middleware.mjs
View file @
fbed7b0
...
...
@@ -20,8 +20,8 @@ const defaultOptions = {
callback: '/login/callback',
logout: '/logout',
logoutReturnTo: '/',
refreshToken: '/login/
refresh/token
',
token
s: '/login/tokens
',
refreshToken: '/login/
token/refresh
',
token
: '/login/token
',
},
session: {
secret: 'some-secret',
...
...
@@ -201,7 +201,7 @@ export default async (...options) => {
const { user: { tokenSet: { access_token, expires_at } = {} } = {} } = passport
res.end(JSON.stringify({ access_token, expires_at }))
})
auth.get(options.auth.token
s
, async (req, res, next) => {
auth.get(options.auth.token, async (req, res, next) => {
const passport = await refreshToken(req, true)
if (passport) {
const { user: { tokenSet } } = passport
...
...
Please
register
or
sign in
to post a comment