#NEWLINE# def signin_oauth( oauth_app , scheme = None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# flask . session . pop ( 'oauth_token' , None ) #NEWLINE# save_request_params ( ) #NEWLINE# return oauth_app . authorize ( callback = flask . url_for ( ( '%s_authorized' % oauth_app . name ) , _external = True , _scheme = scheme ) ) #NEWLINE# #UNINDENT# except oauth . OAuthException : #NEWLINE# #INDENT# flask . flash ( 'Something went wrong with sign in. Please try again.' , category = 'danger' ) #NEWLINE# return flask . redirect ( flask . url_for ( 'signin' , next = util . get_next_url ( ) ) )