Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Plugin name #521

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
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
9 changes: 6 additions & 3 deletions src/google-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const GoogleLogin = props => {
accessType,
responseType,
jsSrc,
prompt
prompt,
pluginName
} = props

const { signIn, loaded } = useGoogleLogin({
Expand All @@ -60,7 +61,8 @@ const GoogleLogin = props => {
accessType,
responseType,
jsSrc,
prompt
prompt,
pluginName
})
const disabled = disabledProp || !loaded

Expand Down Expand Up @@ -169,7 +171,8 @@ GoogleLogin.propTypes = {
accessType: PropTypes.string,
render: PropTypes.func,
theme: PropTypes.string,
icon: PropTypes.bool
icon: PropTypes.bool,
pluginName: PropTypes.string
}

GoogleLogin.defaultProps = {
Expand Down
6 changes: 4 additions & 2 deletions src/use-google-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const useGoogleLogin = ({
accessType,
responseType,
jsSrc = 'https://apis.google.com/js/api.js',
prompt
prompt,
pluginName
}) => {
const [loaded, setLoaded] = useState(false)

Expand Down Expand Up @@ -90,7 +91,8 @@ const useGoogleLogin = ({
ux_mode: uxMode,
redirect_uri: redirectUri,
scope,
access_type: accessType
access_type: accessType,
plugin_name: pluginName
}

if (responseType === 'code') {
Expand Down