Add boilerplate for Google sign-in

For more information, read:
https://developers.google.com/identity/sign-in/web/sign-in?authuser=1

TODO: Use Elm ports or something similar to properly interop with the onSignIn
and signOn functions defined in index.html.
This commit is contained in:
William Carroll 2020-07-29 10:13:19 +01:00
parent 289cae2528
commit 9f70cb2c61
3 changed files with 23 additions and 2 deletions

View file

@ -5,9 +5,12 @@ import Html.Attributes exposing (..)
import Html.Events exposing (..)
import State
googleSignIn : Html State.Msg
googleSignIn =
div [ class "g-signin2", attribute "onsuccess" "onSignIn" ] []
render : State.Model -> Html State.Msg
render model =
div [ class "pt-10 pb-20 px-10" ]
[ p [] [ text "Please authenticate" ]
[ googleSignIn
]

View file

@ -22,7 +22,7 @@ type alias Model =
init : Model
init =
{ isLoading = False
, view = Landing
, view = Login
}