create-miro-app
Advanced tools
Comparing version 1.10.2 to 1.10.3
@@ -15,3 +15,2 @@ import {Miro} from '@mirohq/miro-api'; | ||
const tokensCookie = 'miro_tokens'; | ||
const userIdCookie = 'miro_user_id'; | ||
@@ -30,3 +29,3 @@ // setup a Miro instance that loads tokens from cookies | ||
}, | ||
set: (userId, state) => { | ||
set: (_, state) => { | ||
if (!response) | ||
@@ -39,3 +38,2 @@ throw new Error( | ||
getSerializedCookie(tokensCookie, JSON.stringify(state)), | ||
getSerializedCookie(userIdCookie, userId.toString()), | ||
]); | ||
@@ -45,4 +43,3 @@ }, | ||
}), | ||
userId: request.cookies[userIdCookie] || '', | ||
}; | ||
} |
@@ -18,3 +18,2 @@ import {Miro} from '@mirohq/miro-api'; | ||
const tokensCookie = 'miro_tokens'; | ||
const userIdCookie = 'miro_user_id'; | ||
@@ -33,3 +32,3 @@ // setup a Miro instance that loads tokens from cookies | ||
}, | ||
set: (userId, state) => { | ||
set: (_, state) => { | ||
if (!response) | ||
@@ -42,3 +41,2 @@ throw new Error( | ||
getSerializedCookie(tokensCookie, JSON.stringify(state)), | ||
getSerializedCookie(userIdCookie, userId.toString()), | ||
]); | ||
@@ -48,4 +46,3 @@ }, | ||
}), | ||
userId: request.cookies[userIdCookie] || '', | ||
}; | ||
} |
@@ -5,3 +5,3 @@ import initMiro from '../../initMiro'; | ||
export default async function handler(req, res) { | ||
const {miro, userId} = initMiro(req, res); | ||
const {miro} = initMiro(req, res); | ||
@@ -15,4 +15,4 @@ // Make sure the code is in query parameters | ||
await miro.exchangeCodeForAccessToken(userId || '', req.query.code); | ||
await miro.exchangeCodeForAccessToken('', req.query.code); | ||
res.redirect('/'); | ||
} |
@@ -9,3 +9,3 @@ import initMiro from '../../initMiro'; | ||
) { | ||
const {miro, userId} = initMiro(req, res); | ||
const {miro} = initMiro(req, res); | ||
@@ -19,4 +19,4 @@ // Make sure the code is in query parameters | ||
await miro.exchangeCodeForAccessToken(userId || '', req.query.code); | ||
await miro.exchangeCodeForAccessToken('', req.query.code); | ||
res.redirect('/'); | ||
} |
@@ -8,6 +8,6 @@ import {useEffect} from 'react'; | ||
export const getServerSideProps = async function getServerSideProps({req}) { | ||
const {userId, miro} = initMiro(req); | ||
const {miro} = initMiro(req); | ||
// redirect to auth url if user has not authorized the app | ||
if (!userId || !(await miro.isAuthorized(userId))) { | ||
if (!(await miro.isAuthorized(''))) { | ||
return { | ||
@@ -21,3 +21,3 @@ redirect: { | ||
const api = miro.as(userId); | ||
const api = miro.as(''); | ||
@@ -24,0 +24,0 @@ const boards = []; |
@@ -15,3 +15,2 @@ import {Miro} from '@mirohq/miro-api'; | ||
const tokensCookie = 'miro_tokens'; | ||
const userIdCookie = 'miro_user_id'; | ||
@@ -30,3 +29,3 @@ // setup a Miro instance that loads tokens from cookies | ||
}, | ||
set: (userId, state) => { | ||
set: (_, state) => { | ||
if (!response) | ||
@@ -39,3 +38,2 @@ throw new Error( | ||
getSerializedCookie(tokensCookie, JSON.stringify(state)), | ||
getSerializedCookie(userIdCookie, userId.toString()), | ||
]); | ||
@@ -45,4 +43,3 @@ }, | ||
}), | ||
userId: request.cookies[userIdCookie] || '', | ||
}; | ||
} |
@@ -18,3 +18,2 @@ import {Miro} from '@mirohq/miro-api'; | ||
const tokensCookie = 'miro_tokens'; | ||
const userIdCookie = 'miro_user_id'; | ||
@@ -33,3 +32,3 @@ // setup a Miro instance that loads tokens from cookies | ||
}, | ||
set: (userId, state) => { | ||
set: (_, state) => { | ||
if (!response) | ||
@@ -42,3 +41,2 @@ throw new Error( | ||
getSerializedCookie(tokensCookie, JSON.stringify(state)), | ||
getSerializedCookie(userIdCookie, userId.toString()), | ||
]); | ||
@@ -48,4 +46,3 @@ }, | ||
}), | ||
userId: request.cookies[userIdCookie] || '', | ||
}; | ||
} |
@@ -5,3 +5,3 @@ import initMiro from '../../initMiro'; | ||
export default async function handler(req, res) { | ||
const {miro, userId} = initMiro(req, res); | ||
const {miro} = initMiro(req, res); | ||
@@ -15,4 +15,4 @@ // Make sure the code is in query parameters | ||
await miro.exchangeCodeForAccessToken(userId || '', req.query.code); | ||
await miro.exchangeCodeForAccessToken('', req.query.code); | ||
res.redirect('/'); | ||
} |
@@ -9,3 +9,3 @@ import initMiro from '../../initMiro'; | ||
) { | ||
const {miro, userId} = initMiro(req, res); | ||
const {miro} = initMiro(req, res); | ||
@@ -19,4 +19,4 @@ // Make sure the code is in query parameters | ||
await miro.exchangeCodeForAccessToken(userId || '', req.query.code); | ||
await miro.exchangeCodeForAccessToken('', req.query.code); | ||
res.redirect('/'); | ||
} |
@@ -8,6 +8,6 @@ import {useEffect} from 'react'; | ||
export const getServerSideProps = async function getServerSideProps({req}) { | ||
const {userId, miro} = initMiro(req); | ||
const {miro} = initMiro(req); | ||
// redirect to auth url if user has not authorized the app | ||
if (!userId || !(await miro.isAuthorized(userId))) { | ||
if (!(await miro.isAuthorized(''))) { | ||
return { | ||
@@ -21,3 +21,3 @@ redirect: { | ||
const api = miro.as(userId); | ||
const api = miro.as(''); | ||
@@ -24,0 +24,0 @@ const boards = []; |
{ | ||
"name": "create-miro-app", | ||
"version": "1.10.2", | ||
"version": "1.10.3", | ||
"keywords": [ | ||
@@ -64,3 +64,3 @@ "miro", | ||
"lodash.template": "4.5.0", | ||
"np": "7.6.0", | ||
"np": "^7.6.3", | ||
"picocolors": "1.0.0", | ||
@@ -67,0 +67,0 @@ "prettier": "2.5.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1145464
4285