1.0.4 • Published 7 years ago

ngx-google-sign-in v1.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
7 years ago

ngx-google-signin

How to install

Run npm i ngx-google-sign-in --save

How to use

Declare the module

NgxGoogleSignInModule.forRoot()

Provide ApiKey

In your root component: constructor(private provider: GoogleSignInProviderService) { provider.init(api-key) }

That's all!

Public API:

NgxGoogleSignIn expose the following methods:

computeGoogleSignInElement(domElement): void

Attach google's handler to the provided DomElement

isLoggedIn:Observable

Check if an user is already registered

reloadAuthResponse

Force token refreshing

getAuthResponse(includeAuthorizationData?: boolean)

hasGrantedScopes(scopes: string)

Check if the googleUser has the rights on the provided scopes

getCurrentUser:

Expose the current user

getBasicProfile

Expose the basic profile of the current user

signOut

Sign out the current user

disconnect

Disconnect the current user

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago