1.6.2 • Published 6 months ago
@8base/web-oauth-client v1.6.2
8base api token auth client
The 8base web oauth client for the AuthProvider
.
WebOAuthClient
Table of Contents
WebOAuthClient
Create instance of the web oauth client
Parameters
authorize
Function Function used to describe authorize logic.
Usage
Firebase oauth
import firebase from 'firebase';
import { WebOAuthClient } from '@8base/web-oauth-client';
const FIREBASE_CONFIGURATION = {
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: ""
};
const firebaseAuth = firebase.initializeApp(FIREBASE_CONFIGURATION).auth();
const authClient = new WebOAuthClient({
authorize (email, password) {
return firebaseAuth.signInWithEmailAndPassword(
email,
password,
)
.then(() => firebaseAuth.currentUser.getIdToken())
.then((token) => {
return token;
})
},
logout() {
window.addEventListener('unload', () => {
this.purgeState();
});
window.location.href = '/';
}
});
Examples
3.1.0-beta.0
6 months ago
3.0.0-beta.1
1 year ago
3.0.0-beta.3
1 year ago
3.0.0-beta.0
2 years ago
2.7.0-beta.0
2 years ago
1.6.2
2 years ago
2.6.6
2 years ago
2.6.3
3 years ago
2.6.2
3 years ago
2.6.5
3 years ago
1.6.1
3 years ago
2.5.0
3 years ago
1.5.0
3 years ago
2.4.0
3 years ago
2.3.0
3 years ago
1.4.5
3 years ago
2.2.0
3 years ago
2.1.0
3 years ago
1.4.4
3 years ago
2.0.2
3 years ago
1.4.3
3 years ago
1.4.2
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.4.0
4 years ago
1.3.2
4 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.2.9
4 years ago
1.2.8
4 years ago
1.2.7
4 years ago
1.2.6
4 years ago
1.2.5
4 years ago
1.2.4
4 years ago
1.2.3
4 years ago
1.2.2
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.1
5 years ago