elm-google-sign-in
Version:
Elm bindings to the "Sign in with Google" widget
18 lines (15 loc) • 438 B
JavaScript
import ElmGoogleSignIn from '../index.js';
import { Elm } from './src/Main.elm';
let googleSignOutComplete = new EventTarget();
let elm = document.createElement('div');
document.body.appendChild(elm);
let app = Elm.Main.init({
node: elm,
flags: googleSignOutComplete
});
app.ports.googleSignOut.subscribe(clientId => {
ElmGoogleSignIn.signOut({
port: app.ports.googleSignOutComplete,
clientId: clientId,
})
});