Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-miro-app

Package Overview
Dependencies
Maintainers
6
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-miro-app - npm Package Compare versions

Comparing version 1.10.2 to 1.10.3

5

dist/targets/universal/nextjs/initMiro.js

@@ -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] || '',
};
}

4

dist/targets/universal/nextjs/pages/api/redirect.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc