Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/GoogleAuthorize.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ class GoogleAuthorize extends Component {
fetch_basic_profile: fetchBasicProfile,
ux_mode: uxMode,
redirect_uri: redirectUri,
response_type: responseType,
include_granted_scopes: true,
discoveryDocs,
prompt,
scope,
};

if (responseType === 'code') {
if (params.response_type === 'code') {
params.access_type = 'offline';
params.response_type = 'code';
Copy link
Copy Markdown

@eliranamar eliranamar Sep 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for this duplicate re-assign. please remove line 76

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaxwellGBrown any chance to do this, and to also add a test?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eliranamar Thank you; Dropped line 76.

@advance512 Will look into it. Doesn't look as if there's any tests for the click event, and gapi isn't mocked out or anything, so I'll see if the effort required matches my desired involvement 😬 .

}
Expand All @@ -87,7 +88,7 @@ class GoogleAuthorize extends Component {
return;
}

if (responseType === 'code') {
if (params.response_type === 'code') {
onSuccess(response);
} else {
onSuccess(response);
Expand Down