New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@coursekit/client

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coursekit/client - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1-beta.0

26

dist/library.js

@@ -404,14 +404,16 @@ 'use strict';

let refreshToken;
const urlParams = new URLSearchParams(window.location.search);
accessToken = urlParams.get('access_token');
refreshToken = urlParams.get('refresh_token');
if (accessToken && refreshToken) {
const accessExpiry = new Date(new Date().getTime() + (30 * 1000));
const refreshExpiry = new Date(new Date().getTime() + (43200 * 60 * 1000));
Cookie__default["default"].set('access_token', accessToken, { expires: accessExpiry});
Cookie__default["default"].set('refresh_token', refreshToken, { expires: refreshExpiry });
window.history.replaceState({}, document.title, window.location.href.split('?')[0]);
} else {
accessToken = Cookie__default["default"].get('access_token');
refreshToken = Cookie__default["default"].get('refresh_token');
if (typeof window !== 'undefined') {
const urlParams = new URLSearchParams(window.location.search);
accessToken = urlParams.get('access_token');
refreshToken = urlParams.get('refresh_token');
if (accessToken && refreshToken) {
const accessExpiry = new Date(new Date().getTime() + (30 * 1000));
const refreshExpiry = new Date(new Date().getTime() + (43200 * 60 * 1000));
Cookie__default["default"].set('access_token', accessToken, { expires: accessExpiry});
Cookie__default["default"].set('refresh_token', refreshToken, { expires: refreshExpiry });
window.history.replaceState({}, document.title, window.location.href.split('?')[0]);
} else {
accessToken = Cookie__default["default"].get('access_token');
refreshToken = Cookie__default["default"].get('refresh_token');
}
}

@@ -418,0 +420,0 @@ return { accessToken, refreshToken }

@@ -15,14 +15,16 @@ import createCache from './createCache'

let refreshToken
const urlParams = new URLSearchParams(window.location.search)
accessToken = urlParams.get('access_token')
refreshToken = urlParams.get('refresh_token')
if (accessToken && refreshToken) {
const accessExpiry = new Date(new Date().getTime() + (30 * 1000))
const refreshExpiry = new Date(new Date().getTime() + (43200 * 60 * 1000))
Cookie.set('access_token', accessToken, { expires: accessExpiry})
Cookie.set('refresh_token', refreshToken, { expires: refreshExpiry })
window.history.replaceState({}, document.title, window.location.href.split('?')[0])
} else {
accessToken = Cookie.get('access_token')
refreshToken = Cookie.get('refresh_token')
if (typeof window !== 'undefined') {
const urlParams = new URLSearchParams(window.location.search)
accessToken = urlParams.get('access_token')
refreshToken = urlParams.get('refresh_token')
if (accessToken && refreshToken) {
const accessExpiry = new Date(new Date().getTime() + (30 * 1000))
const refreshExpiry = new Date(new Date().getTime() + (43200 * 60 * 1000))
Cookie.set('access_token', accessToken, { expires: accessExpiry})
Cookie.set('refresh_token', refreshToken, { expires: refreshExpiry })
window.history.replaceState({}, document.title, window.location.href.split('?')[0])
} else {
accessToken = Cookie.get('access_token')
refreshToken = Cookie.get('refresh_token')
}
}

@@ -29,0 +31,0 @@ return { accessToken, refreshToken }

{
"name": "@coursekit/client",
"description": "CourseKit client library",
"version": "0.2.0",
"version": "0.2.1-beta.0",
"main": "dist/library.js",

@@ -6,0 +6,0 @@ "module": "dist/library.mjs",

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