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

Add OAuth Authentication Strategy #516

Merged
merged 17 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 28 additions & 0 deletions backend/config/default.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,34 @@ module.exports = {
],
},

session: {
secret: '',
},

oauth: {
enabled: false,
provider: 'cognito',

grant: {
// Grant configuration options, provide any option from:
// https://www.npmjs.com/package/grant
defaults: {
origin: '',
prefix: '/api/connect',
transport: 'session',
},

cognito: {
key: '',
secret: '',
dynamic: ['scope'],
response: ['tokens', 'raw', 'jwt'],
callback: '/',
subdomain: '',
},
},
},

// These settings are PUBLIC and shared with the UI
ui: {
// Show a banner at the top of the screen on all pages
Expand Down
7 changes: 7 additions & 0 deletions backend/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
declare module 'dev-null'

type callback = (err: string | undefined) => void

declare namespace Express {
interface Request {
user: UserDoc

reqId: string
log: Logger

session: {
destroy: (callback) => void
grant: any
}
}

interface Response {
Expand Down
Loading