You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP →

@nhost/hasura-auth-js

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nhost/hasura-auth-js - npm Package Compare versions

Comparing version

to
2.5.4

@@ -95,11 +95,61 @@ import { NhostSession, Provider } from './hasura-auth';

* Recommended values:
*
* - `'web'` and `'cookies'`: no value is required
* - `'react-native'`: `import Storage from @react-native-async-storage/async-storage`
* - `'cookies'`: `localStorage`
* - `'react-native'`: use [@react-native-async-storage/async-storage](https://www.npmjs.com/package/@react-native-async-storage/async-storage)
* ```ts
* import { NhostClient } from '@nhost/nhost-js'
* import AsyncStorage from '@react-native-async-storage/async-storage';
* const nhost = new NhostClient({
* ...
* clientStorageType: 'react-native',
* clientStorage: AsyncStorage
* })
* ```
* - `'custom'`: an object that defines the following methods:
* - `setItem` or `setItemAsync`
* - `getItem` or `getItemAsync`
* - `removeItem`
* - `'capacitor'`: `import { Storage } from @capacitor/storage`
* - `'expo-secure-store'`: `import * as SecureStore from 'expo-secure-store'`
* - `setItem` or `setItemAsync`
* - `getItem` or `getItemAsync`
* - `removeItem`
* - `'capacitor'`:
*
* - capacitor version **< 4** : use [@capacitor/storage](https://www.npmjs.com/package/@capacitor/storage)
*
* ```ts
* import { NhostClient } from '@nhost/nhost-js'
* import { Storage } from '@capacitor/storage'
* const nhost = new NhostClient({
* ...
* clientStorageType: 'capacitor',
* clientStorage: Storage
* })
* ```
*
* - capacitor version **>= 4** : use [@capacitor/preferences](https://www.npmjs.com/package/@capacitor/preferences)
*
* ```ts
* import { NhostClient } from '@nhost/nhost-js';
* import { Preferences } from '@capacitor/preferences';
* const nhost = new NhostClient({
* ...
* clientStorageType: 'custom',
* clientStorage: {
* setItemAsync: async (key, value) => Preferences.set({ key, value }),
* getItemAsync: async (key) => {
* const { value } = await Preferences.get({ key });
* return value;
* },
* removeItem: (key) => Preferences.remove({ key })
* },
* });
* ```
*
* - `'expo-secure-store'`: use [expo-secure-store](https://www.npmjs.com/package/expo-secure-store)
* ```ts
* import { NhostClient } from '@nhost/nhost-js'
* import * as SecureStore from 'expo-secure-store';
* const nhost = new NhostClient({
* ...
* clientStorageType: 'expo-secure-store',
* clientStorage: SecureStore
* })
* ```
*/

@@ -106,0 +156,0 @@ clientStorage?: ClientStorage;

{
"name": "@nhost/hasura-auth-js",
"version": "2.5.3",
"version": "2.5.4",
"description": "Hasura-auth client",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet