Change `/google_api/authorizations/` to `/google_api/auth/`.
This commit is contained in:
parent
2178cd44c5
commit
0fbe0406fd
|
@ -2,7 +2,7 @@ module GoogleApi
|
|||
class AuthorizationsController < ApplicationController
|
||||
def callback
|
||||
token, expires_at = GoogleApi::CloudPlatform::Client
|
||||
.new(nil, callback_google_api_authorizations_url)
|
||||
.new(nil, callback_google_api_auth_url)
|
||||
.get_token(params[:code])
|
||||
|
||||
session[GoogleApi::CloudPlatform::Client.session_key_for_token] = token
|
||||
|
|
|
@ -17,7 +17,7 @@ class Projects::ClustersController < Projects::ApplicationController
|
|||
def login
|
||||
begin
|
||||
@authorize_url = GoogleApi::CloudPlatform::Client.new(
|
||||
nil, callback_google_api_authorizations_url,
|
||||
nil, callback_google_api_auth_url,
|
||||
state: namespace_project_clusters_url.to_s).authorize_url
|
||||
rescue GoogleApi::Auth::ConfigMissingError
|
||||
# no-op
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
namespace :google_api do
|
||||
resource :authorizations, only: [], controller: :authorizations do
|
||||
resource :auth, only: [], controller: :authorizations do
|
||||
match :callback, via: [:get, :post]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue