2018-09-23 15:44:14 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-12-19 09:15:29 -05:00
|
|
|
class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
|
2015-05-01 04:39:11 -04:00
|
|
|
layout 'profile'
|
2014-12-19 09:15:29 -05:00
|
|
|
|
2018-10-30 06:53:01 -04:00
|
|
|
# Overridden from Doorkeeper::AuthorizationsController to
|
2016-12-09 12:37:18 -05:00
|
|
|
# include the call to session.delete
|
2014-12-19 09:15:29 -05:00
|
|
|
def new
|
|
|
|
if pre_auth.authorizable?
|
|
|
|
if skip_authorization? || matching_token?
|
|
|
|
auth = authorization.authorize
|
2016-02-19 08:22:06 -05:00
|
|
|
session.delete(:user_return_to)
|
2014-12-19 09:15:29 -05:00
|
|
|
redirect_to auth.redirect_uri
|
|
|
|
else
|
|
|
|
render "doorkeeper/authorizations/new"
|
|
|
|
end
|
|
|
|
else
|
|
|
|
render "doorkeeper/authorizations/error"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|