Backwards compatibility for Google logins

This commit is contained in:
Michael Snoyman 2011-02-05 19:57:10 +02:00
parent 71f3170ec8
commit 83975113df

View File

@ -26,7 +26,7 @@ authOpenId :: YesodAuth m => AuthPlugin m
authOpenId =
AuthPlugin "openid" dispatch login
where
complete = PluginR "openid" ["complete"]
complete = PluginR "openid" ["complete", ""]
name = "openid_identifier"
login tm = do
ident <- lift newIdent
@ -71,10 +71,10 @@ authOpenId =
toMaster <- getRouteToMaster
setMessage $ messageNoOpenID y
redirect RedirectTemporary $ toMaster LoginR
dispatch "GET" ["complete"] = do
dispatch "GET" ["complete", ""] = do
rr <- getRequest
completeHelper $ reqGetParams rr
dispatch "POST" ["complete"] = do
dispatch "POST" ["complete", ""] = do
(posts, _) <- runRequestBody
completeHelper posts
dispatch _ _ = notFound