app/routes/setup/two.js
// TODO: reduce duplication with setup/signin/signup routes
reduce duplication with setup/signin/signup routes
reduce duplication with setup / signin / signup routes
authenticateWithGhostOrg() {
            let authStrategy = 'authenticator:oauth2-ghost';
            this.toggleProperty('controller.loggingIn');
            this.set('controller.flowErrors', '');
            return this.get('torii')
                .open('ghost-oauth2', {type: 'setup'})
                .then((authentication) => {
                    return this.send('authenticate', authStrategy, [authentication]);
                })
                .catch(() => {
                    this.toggleProperty('controller.loggingIn');
                    this.set('controller.flowErrors', 'Authentication with Ghost.org denied or failed');
                });
        }
authenticateWithGhostOrg ( ) { let authStrategy = 'authenticator:oauth2-ghost' ; this . toggleProperty ( 'controller.loggingIn' ) ; this . set ( 'controller.flowErrors' , '' ) ; return this . get ( 'torii' ) . open ( 'ghost-oauth2' , { type : 'setup' } ) . then ( ( authentication ) => { return this . send ( 'authenticate' , authStrategy , [ authentication ] ) ; } ) . catch ( ( ) => { this . toggleProperty ( 'controller.loggingIn' ) ; this . set ( 'controller.flowErrors' , 'Authentication with Ghost.org denied or failed' ) ; } ) ; }
TODO: reduce duplication with setup/signin/signup routes
TODO : reduce duplication with setup / signin / signup routes