protected function _setRedirectUrl(ServerRequest $request)
    {
        $request->getSession()->delete('SocialAuth.redirectUrl');

        $redirectUrl = $request->getQuery(static::QUERY_STRING_REDIRECT);
        if (empty($redirectUrl)
            || substr($redirectUrl, 0, 1) !== '/'
            || substr($redirectUrl, 0, 2) === '//'
        ) {
            return;
        }

        $request->getSession()->write('SocialAuth.redirectUrl', $redirectUrl);
    }
protected function _setRedirectUrl(ServerRequest $request)
    {
        $request->getSession()->delete('SocialAuth.redirectUrl');

        $redirectUrl = $request->getQuery(static::QUERY_STRING_REDIRECT);
        if (empty($redirectUrl)
            || substr($redirectUrl, 0, 1) !== '/'
            || substr($redirectUrl, 0, 2) === '//'
        ) {
            return;
        }

        $request->getSession()->write('SocialAuth.redirectUrl', $redirectUrl);
    }
protected function _setRedirectUrl ( ServerRequest $ request ) { $ request -> getSession ( ) -> delete ( 'SocialAuth.redirectUrl' ) ; $ redirectUrl = $ request -> getQuery ( static :: QUERY_STRING_REDIRECT ) ; if ( empty ( $ redirectUrl ) || substr ( $ redirectUrl , 0 , 1 ) !== '/' || substr ( $ redirectUrl , 0 , 2 ) === '//' ) { return ; } $ request -> getSession ( ) -> write ( 'SocialAuth.redirectUrl' , $ redirectUrl ) ; }
Save URL to redirect to after authentication to session.

@param \Cake\Http\ServerRequest $request Request instance.

@return void
Save URL to redirect to after authentication to session .