Elm bindings to the "Sign in With Google" widget
See the github for more information: https://github.com/cedric-h/elm-google-sign-in
view : List (Attribute msg) -> Html msg
Yields a Google sign in button intended for use with elm/html
styledView : List (Attribute msg) -> Html.Styled.Html msg
Yields a Google sign in button intended for use with rtfeldman/elm-css
Like a normal HTML Attribute, but these can only apply to Google Sign in Buttons
idAttr : ClientId -> Attribute msg
Supply the ClientId for the application this button should sign in to.
onSignIn : (Profile -> msg) -> Attribute msg
Respond to when the user completes signing in through Google.
{ id : String
, idToken : String
, name : String
, givenName : String
, familyName : String
, imageUrl : String
, email : Maybe String
}
All of the important information Google stores about a user.
The idToken
is what should be sent back to your server for authentication purposes.
The email
field is only present if your clientId has the right scopes.
What Google uses to keep track of your application
encodeId : ClientId -> Json.Encode.Value
Turns a ClientId into a JSON value, mainly for shipping through a port.