Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit 8b7e431

Browse files
committed
format
1 parent d8b972e commit 8b7e431

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

typescript-admin-portal-example/routes/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import express, { Request, Response, Router }from 'express'
1+
import express, { Request, Response, Router } from 'express'
22
import WorkOS, { GeneratePortalLinkIntent } from '@workos-inc/node'
33
import { Organization } from '@workos-inc/node/lib/organizations/interfaces/organization.interface'
44
import { List } from '@workos-inc/node/lib/common/interfaces/list.interface'

typescript-magic-link-example/routes/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import express, { Request, Response, Router }from 'express'
1+
import express, { Request, Response, Router } from 'express'
22
import WorkOS, { PasswordlessSession, ProfileAndToken } from '@workos-inc/node'
33

44
const workos: WorkOS = new WorkOS(process.env.WORKOS_API_KEY)
@@ -19,7 +19,7 @@ router.post('/passwordless-auth', async (req: Request, res: Response) => {
1919
type: 'MagicLink'
2020
})
2121

22-
await workos.passwordless.sendSession(session.id)
22+
await workos.passwordless.sendSession(session.id)
2323

2424
res.render('confirmation.ejs', {
2525
email: session.email,
@@ -28,11 +28,11 @@ router.post('/passwordless-auth', async (req: Request, res: Response) => {
2828
})
2929

3030
router.get('/callback', async (req: Request, res: Response) => {
31-
const code: string = typeof req.query.code == 'string' ? req.query.code : ''
31+
const code: string = typeof req.query.code == 'string' ? req.query.code : ''
3232
const profile: ProfileAndToken = await workos.sso.getProfileAndToken({
3333
code,
3434
clientID,
35-
})
35+
})
3636

3737
res.render('login_successful.ejs', {
3838
profile: JSON.stringify(profile, null, 4),

typescript-mfa-example/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ app.use(morgan('dev'))
1717

1818
app.use('/', router)
1919

20-
app.listen( port, (): void => {
20+
app.listen(port, (): void => {
2121
console.log(`⚡️[server]: Server is running at https://localhost:${port}`)
2222
})

typescript-mfa-example/routes/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ router.post('/verify_factor', async (req: Request, res: Response) => {
9595
authenticationChallengeId: challenge_id,
9696
code: code,
9797
})
98-
98+
9999
res.render('challenge_success.ejs', { title: 'Challenge Success', verify_factor: verify_factor })
100100
})
101101

typescript-sso-example/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ app.use(morgan('dev'))
1717

1818
app.use('/', router)
1919

20-
app.listen( port, (): void => {
20+
app.listen(port, (): void => {
2121
console.log(`⚡️[server]: Server is running at https://localhost:${port}`)
2222
})

typescript-sso-example/routes/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ const session: any = require('express-session')
77

88
app.use(
99
session({
10-
secret: 'keyboard cat',
11-
resave: false,
12-
saveUninitialized: true,
13-
cookie: { secure: true },
10+
secret: 'keyboard cat',
11+
resave: false,
12+
saveUninitialized: true,
13+
cookie: { secure: true },
1414
})
1515
)
1616

1717
const workos: WorkOS = new WorkOS(process.env.WORKOS_API_KEY)
1818
const clientID: string = process.env.WORKOS_CLIENT_ID !== undefined ? process.env.WORKOS_CLIENT_ID : ''
19-
const organizationID: string = 'org_01GRC2753QJJG6TWFF7R70TS0M'
19+
const organizationID: string = 'org_01GRC2753QJJG6TWFF7R70TS0M'
2020
const redirectURI: string = 'http://localhost:8000/callback'
2121
const state: string = ''
2222

@@ -43,7 +43,7 @@ router.get('/login', (req: Request, res: Response) => {
4343
redirectURI: redirectURI,
4444
state: state,
4545
})
46-
46+
4747
res.redirect(url)
4848
} catch (error) {
4949
res.render('error.ejs', { error: error })

0 commit comments

Comments
 (0)