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

@supabase/gotrue-js

Package Overview
Dependencies
Maintainers
3
Versions
299
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supabase/gotrue-js - npm Package Compare versions

Comparing version 1.11.3 to 1.12.0

2

dist/main/GoTrueApi.d.ts

@@ -92,5 +92,7 @@ import { Session, Provider, UserAttributes, CookieOptions, User } from './lib/types';

* @param redirectTo A URL or mobile address to send the user to after they are confirmed.
* @param scopes A space-separated list of scopes granted to the OAuth application.
*/
getUrlForProvider(provider: Provider, options: {
redirectTo?: string;
scopes?: string;
}): string;

@@ -97,0 +99,0 @@ /**

@@ -155,2 +155,3 @@ "use strict";

* @param redirectTo A URL or mobile address to send the user to after they are confirmed.
* @param scopes A space-separated list of scopes granted to the OAuth application.
*/

@@ -162,2 +163,5 @@ getUrlForProvider(provider, options) {

}
if (options === null || options === void 0 ? void 0 : options.scopes) {
urlParams.push(`scopes=${options.scopes}`);
}
return `${this.url}/authorize?${urlParams.join('&')}`;

@@ -164,0 +168,0 @@ }

@@ -63,5 +63,7 @@ import GoTrueApi from './GoTrueApi';

* @param redirectTo A URL or mobile address to send the user to after they are confirmed.
* @param scopes A space-separated list of scopes granted to the OAuth application.
*/
signIn({ email, password, provider }: UserCredentials, options?: {
redirectTo?: string;
scopes?: string;
}): Promise<{

@@ -68,0 +70,0 @@ session: Session | null;

@@ -107,2 +107,3 @@ "use strict";

* @param redirectTo A URL or mobile address to send the user to after they are confirmed.
* @param scopes A space-separated list of scopes granted to the OAuth application.
*/

@@ -127,2 +128,3 @@ signIn({ email, password, provider }, options = {}) {

redirectTo: options.redirectTo,
scopes: options.scopes,
});

@@ -205,2 +207,3 @@ }

throw new Error(error_description);
const provider_token = helpers_1.getParameterByName('provider_token');
const access_token = helpers_1.getParameterByName('access_token');

@@ -222,2 +225,3 @@ if (!access_token)

const session = {
provider_token,
access_token,

@@ -306,3 +310,6 @@ expires_in: parseInt(expires_in),

_handleProviderSignIn(provider, options = {}) {
const url = this.api.getUrlForProvider(provider, { redirectTo: options.redirectTo });
const url = this.api.getUrlForProvider(provider, {
redirectTo: options.redirectTo,
scopes: options.scopes,
});
try {

@@ -309,0 +316,0 @@ // try to open on the browser

export declare type Provider = 'azure' | 'bitbucket' | 'facebook' | 'github' | 'gitlab' | 'google';
export declare type AuthChangeEvent = 'SIGNED_IN' | 'SIGNED_OUT' | 'USER_UPDATED' | 'PASSWORD_RECOVERY';
export interface Session {
provider_token?: string | null;
access_token: string;

@@ -5,0 +6,0 @@ expires_in: number;

@@ -92,5 +92,7 @@ import { Session, Provider, UserAttributes, CookieOptions, User } from './lib/types';

* @param redirectTo A URL or mobile address to send the user to after they are confirmed.
* @param scopes A space-separated list of scopes granted to the OAuth application.
*/
getUrlForProvider(provider: Provider, options: {
redirectTo?: string;
scopes?: string;
}): string;

@@ -97,0 +99,0 @@ /**

@@ -153,2 +153,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

* @param redirectTo A URL or mobile address to send the user to after they are confirmed.
* @param scopes A space-separated list of scopes granted to the OAuth application.
*/

@@ -160,2 +161,5 @@ getUrlForProvider(provider, options) {

}
if (options === null || options === void 0 ? void 0 : options.scopes) {
urlParams.push(`scopes=${options.scopes}`);
}
return `${this.url}/authorize?${urlParams.join('&')}`;

@@ -162,0 +166,0 @@ }

@@ -63,5 +63,7 @@ import GoTrueApi from './GoTrueApi';

* @param redirectTo A URL or mobile address to send the user to after they are confirmed.
* @param scopes A space-separated list of scopes granted to the OAuth application.
*/
signIn({ email, password, provider }: UserCredentials, options?: {
redirectTo?: string;
scopes?: string;
}): Promise<{

@@ -68,0 +70,0 @@ session: Session | null;

@@ -102,2 +102,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

* @param redirectTo A URL or mobile address to send the user to after they are confirmed.
* @param scopes A space-separated list of scopes granted to the OAuth application.
*/

@@ -122,2 +123,3 @@ signIn({ email, password, provider }, options = {}) {

redirectTo: options.redirectTo,
scopes: options.scopes,
});

@@ -200,2 +202,3 @@ }

throw new Error(error_description);
const provider_token = getParameterByName('provider_token');
const access_token = getParameterByName('access_token');

@@ -217,2 +220,3 @@ if (!access_token)

const session = {
provider_token,
access_token,

@@ -301,3 +305,6 @@ expires_in: parseInt(expires_in),

_handleProviderSignIn(provider, options = {}) {
const url = this.api.getUrlForProvider(provider, { redirectTo: options.redirectTo });
const url = this.api.getUrlForProvider(provider, {
redirectTo: options.redirectTo,
scopes: options.scopes,
});
try {

@@ -304,0 +311,0 @@ // try to open on the browser

export declare type Provider = 'azure' | 'bitbucket' | 'facebook' | 'github' | 'gitlab' | 'google';
export declare type AuthChangeEvent = 'SIGNED_IN' | 'SIGNED_OUT' | 'USER_UPDATED' | 'PASSWORD_RECOVERY';
export interface Session {
provider_token?: string | null;
access_token: string;

@@ -5,0 +6,0 @@ expires_in: number;

2

package.json
{
"name": "@supabase/gotrue-js",
"version": "1.11.3",
"version": "1.12.0",
"description": "Isomorphic GoTrue client",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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