def external_first_login_authenticate(user, response):
 data = (session.data if session._get_current_object() else {})
 data.update({'auth_user_external_id_provider': user['external_id_provider'], 'auth_user_external_id': user['external_id'], 'auth_user_fullname': user['fullname'], 'auth_user_access_token': user['access_token'], 'auth_user_external_first_login': True, 'service_url': user['service_url']})
 response = create_session(response, data=data)
 return response

def external_first_login_authenticate ( user , response ) : data = ( session . data if session . _get_current_object ( ) else { } ) data . update ( { 'auth_user_external_id_provider' : user [ 'external_id_provider' ] , 'auth_user_external_id' : user [ 'external_id' ] , 'auth_user_fullname' : user [ 'fullname' ] , 'auth_user_access_token' : user [ 'access_token' ] , 'auth_user_external_first_login' : True , 'service_url' : user [ 'service_url' ] } ) response = create_session ( response , data = data ) return response
create a special unauthenticated session for user login through external identity provider for the first time .