src/interactive-auth.js
function(flow) {
        const completed = (this._data || {}).completed || [];
        for (let i = 0; i < flow.stages.length; ++i) {
            const stageType = flow.stages[i];
            if (completed.indexOf(stageType) === -1) {
                return stageType;
            }
        }
    }
function(flow) {
        const completed = (this._data || {}).completed || [];
        for (let i = 0; i < flow.stages.length; ++i) {
            const stageType = flow.stages[i];
            if (completed.indexOf(stageType) === -1) {
                return stageType;
            }
        }
    }
function ( flow ) { const completed = ( this . _data || { } ) . completed || [ ] ; for ( let i = 0 ; i < flow . stages . length ; ++ i ) { const stageType = flow . stages [ i ] ; if ( completed . indexOf ( stageType ) === - 1 ) { return stageType ; } } }
Get the first uncompleted stage in the given flow

@private
@param {object} flow
@return {string} login type
Get the first uncompleted stage in the given flow