How to use hellojs - 10 common examples

To help you get started, we’ve selected a few hellojs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adngdb / processeer / client / src / app.jsx View on Github external
document.addEventListener('DOMContentLoaded', () => {
    // Init sign-in library.
    hello.init({
        github: process.env.GITHUB_CLIENT_PUBLIC_ID,
    }, {
        redirect_uri: '/redirect.html',
    });

    const loggerMiddleware = createLogger();

    const store = createStore(
        connectRouter(history)(rootReducer),
        {},
        compose(
            applyMiddleware(
                routerMiddleware(history),
                thunkMiddleware,
                loggerMiddleware,
            ),
github ACloudGuru-Resources / Course-The_Complete_Serverless_Course / section-5 / basic-website-azure / frontend / src / App.js View on Github external
return true
        },
        form: false
      }
    });

    // Configure application details
    hello.init({ azureAD: backendClientID }, {
      redirect_uri: redirectUrl,
      scope: `openid https://${tenantName}.onmicrosoft.com/${backendClientApiID}/${backendClientScopeName}`,
      response_type: 'token id_token',
      resource: `${backendClientApiID}`,
      display: 'page',
    });

    hello.on('auth.login', (auth) => {
      this.handleAuthLogin(auth);
    });

  }
github OpenNeuroOrg / openneuro / src / scripts / user / user.store.js View on Github external
signOut(uploadStatus) {
        let signout = true;
        if (uploadStatus === 'uploading') {
            signout = confirm('You are currently uploading files. Signing out of this site will cancel the upload process. Are you sure you want to sign out?');
        }
        if (signout) {
            hello('google').logout().then(() => {
                upload.setInitialState();
                this.clearAuth();
                router.transitionTo('signIn');
            }, () => {
                // signout failure
            });
        }
    },
github SamsungInternet / snapwat / src / pages / snapshot.js View on Github external
import * as hellojs from 'hellojs';
import {HEADER_HEIGHT} from '../shared/constants';
import {playCameraSound} from '../shared/audio';
import AnnotatePage from './annotate';
import SharePage from './share';
import {PAGES} from '../shared/constants';
import {showPage, showPrompt} from '../shared/helpers';

const hello = hellojs.default;
const PAGE_NAME = PAGES.SNAPSHOT;

let backBtn = document.getElementById('btn-back-snapshot');
let tweetButton = document.getElementById('btn-share-twitter');
let drawingCanvas = document.getElementById('canvas-draw');
let saveCanvas = document.getElementById('canvas-save');
let saveImage = document.getElementById('image-save');
let saveCtx = saveCanvas.getContext('2d');
let cameraCanvas;

function initSave() {

  // May have been swapped out after initial app load
  cameraCanvas = document.getElementById('canvas-camera');

  saveCanvas.width  = cameraCanvas.width;
github conversejs / converse.js / src / converse-oauth.js View on Github external
async oauthLogin (ev) {
                ev.preventDefault();
                const id = ev.target.getAttribute('data-id');
                this.provider = _converse.oauth_providers.get(id);
                this.oauth_service = hello(id);

                const data = {};
                data[id] = this.provider.get('client_id');
                hello.init(data, {
                    'redirect_uri': '/redirect.html'
                });

                await this.oauth_service.login();
                this.fetchOAuthProfileDataAndLogin();
            }
        });
github adngdb / processeer / client / src / actions / signin.jsx View on Github external
return (dispatch) => {
        hello('github').logout()
        .then(() => {
            dispatch(receiveSignedOut());
        }, console.log.bind(console));
    };
}
github Syncano / website / src / services / auth.service.js View on Github external
initHello () {
    const credentials = {
      facebook: process.env.HELLO_FACEBOOK,
      google: process.env.HELLO_GOOGLE,
      github: process.env.HELLO_GITHUB
    }

    const options = {
      scope: 'email',
      redirect_uri: process.env.HELLO_REDIRECT_URI
    }

    hello.init(credentials, options)

    this.hello = hello.bind(hello)
  }
}
github Syncano / syncano-dashboard / src / apps / Account / Hello.js View on Github external
import hello from 'hellojs';

const credentials = {};
const options = {};

credentials.facebook = APP_CONFIG.FACEBOOK_ID;
credentials.google = APP_CONFIG.GOOGLE_ID;
credentials.github = APP_CONFIG.GITHUB_ID;

options.redirect_uri = `${location.protocol}//${location.host}`;
options.scope = 'email';

hello.init(credentials, options);

export default hello;
github marmelab / ZeroDollarHomePage / src / frontend / js / user / userApi.js View on Github external
export const signInWithGithub = () => new Promise((resolve) => {
    hellojs.init({
        github: GITHUB_CLIENT_ID,
    }, {
        oauth_proxy: `${API_URL}/oauthproxy`,
    });

    hellojs
        .login('github')
        .then(auth => {
            hellojs(auth.network).api('/me').then(user => {
                resolve({
                    user: {
                        access_token: auth.authResponse.access_token,
                        ...user,
                    },
                });
            });
github OpenNeuroOrg / openneuro / src / scripts / user / user.store.js View on Github external
initOAuth() {
        hello.init({google: config.auth.google.clientID}, {redirect_uri: '/'});
        this.checkUser();
    },

hellojs

A clientside Javascript library for standardizing requests to OAuth2 web services (and OAuth1 - with a shim)

MIT
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis