Skip to content

Commit

Permalink
feat(package): update package name
Browse files Browse the repository at this point in the history
  • Loading branch information
i7N3 committed Dec 28, 2022
1 parent e864ea3 commit 4f9036d
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 1,660 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# google-oauth-library (OAuth2 | Google)
# google-oauth-gsi (OAuth2 | Google)

A user-friendly API for GIS SDK, using the new [**Google Identity Services SDK**](https://developers.google.com/identity/gsi/web) 🚀

Expand All @@ -11,7 +11,7 @@ A user-friendly API for GIS SDK, using the new [**Google Identity Services SDK**
## Install

```
$ pnpm add google-oauth-library@latest
$ pnpm add google-oauth-gsi@latest
```

## Seamless sign-in and sign-up flows
Expand All @@ -37,7 +37,7 @@ OAuth 2.0 implicit and authorization code flows for web apps
3. Create instance of `GoogleOAuthProvider` somewhere in your application.

```ts
import { GoogleOAuthProvider } from 'google-oauth-library';
import { GoogleOAuthProvider } from 'google-oauth-gsi';

export const googleProvider = new GoogleOAuthProvider({
clientId: process.env.PUBLIC_GOOGLE_CLIENT_ID,
Expand Down Expand Up @@ -93,7 +93,7 @@ const renderButton = provider.useRenderButton({
> If you are using one tap login, when logging user out consider [this issue](https://developers.google.com/identity/gsi/web/guides/automatic-sign-in-sign-out#sign-out) may happen, to prevent it call `googleLogout` when logging user out from your application.
```ts
import { googleLogout } from 'google-oauth-library';
import { googleLogout } from 'google-oauth-gsi';

googleLogout();
```
Expand Down Expand Up @@ -131,7 +131,7 @@ const login = googleProvider.useGoogleLogin({
#### Checks if the user granted all the specified scope or scopes

```ts
import { hasGrantedAllScopesGoogle } from 'google-oauth-library';
import { hasGrantedAllScopesGoogle } from 'google-oauth-gsi';

const hasAccess = hasGrantedAllScopesGoogle(
tokenResponse,
Expand All @@ -143,7 +143,7 @@ const hasAccess = hasGrantedAllScopesGoogle(
#### Checks if the user granted any of the specified scope or scopes

```ts
import { hasGrantedAnyScopeGoogle } from 'google-oauth-library';
import { hasGrantedAnyScopeGoogle } from 'google-oauth-gsi';

const hasAccess = hasGrantedAnyScopeGoogle(
tokenResponse,
Expand Down
2 changes: 1 addition & 1 deletion examples/sveltejs-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"vite": "^4.0.0"
},
"dependencies": {
"google-oauth-library-ts": "file:../../google-oauth-library-ts-0.0.0-development.tgz"
"google-oauth-gsi": "@latest"
}
}
Loading

0 comments on commit 4f9036d

Please sign in to comment.