2015-04-26 12:48:37 +05:30
|
|
|
class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
|
2015-09-11 14:41:01 +05:30
|
|
|
layout 'profile'
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
# Overriden from Doorkeeper::AuthorizationsController to
|
|
|
|
# include the call to session.delete
|
2015-04-26 12:48:37 +05:30
|
|
|
def new
|
|
|
|
if pre_auth.authorizable?
|
|
|
|
if skip_authorization? || matching_token?
|
|
|
|
auth = authorization.authorize
|
2016-06-02 11:05:42 +05:30
|
|
|
session.delete(:user_return_to)
|
2015-04-26 12:48:37 +05:30
|
|
|
redirect_to auth.redirect_uri
|
|
|
|
else
|
|
|
|
render "doorkeeper/authorizations/new"
|
|
|
|
end
|
|
|
|
else
|
|
|
|
render "doorkeeper/authorizations/error"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|