MarkEdmondson1234 / googleAuthR

Google API Client Library for R. Easy authentication and help to build Google API R libraries with OAuth2. Shiny compatible.
https://code.markedmondson.me/googleAuthR
Other
175 stars 51 forks source link

googleSignIn documentation incorrect #171

Closed jonthegeek closed 4 years ago

jonthegeek commented 4 years ago

What goes wrong

The googleSignIn documentation says the values are g_id, g_email, g_image, and signed_in, but the actual values are id, name, email, image, and signed_in. It looks like the fields are renamed from their in-module names during the return:

function (input, output, session) 
{
    check_package_loaded("shiny")
    shiny::reactive({
        shiny::req(input$g_id)
        list(id = input$g_id, name = input$g_name, email = input$g_email, 
            image = input$g_image, signed_in = input$signed_in)
    })
}

I assume the preferred fix would be to change the documentation (since anybody using this has to be grabbing the g-less version of the list element), but wanted to check before submitting a PR.

MarkEdmondson1234 commented 4 years ago

Yes documentation fix preferred, thanks for spotting it! IIRC it was a relic of the code example it was built from.


From: Jon Harmon notifications@github.com Sent: Wednesday, January 8, 2020 9:28 PM To: MarkEdmondson1234/googleAuthR Cc: Subscribed Subject: [MarkEdmondson1234/googleAuthR] googleSignIn documentation incorrect (#171)

What goes wrong

The googleSignIn documentation says the values are g_id, g_email, g_image, and signed_in, but the actual values are id, name, email, image, and signed_in. It looks like the fields are renamed from their in-module names during the return:

function (input, output, session) { check_package_loaded("shiny") shiny::reactive({ shiny::req(input$g_id) list(id = input$g_id, name = input$g_name, email = input$g_email, image = input$g_image, signed_in = input$signed_in) }) }

I assume the preferred fix would be to change the documentation (since anybody using this has to be grabbing the g-less version of the list element), but wanted to check before submitting a PR.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkEdmondson1234/googleAuthR/issues/171?email_source=notifications&email_token=AAYCPLEGRUDFJVSTYLHIF6LQ4YZQNA5CNFSM4KEOELLKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IE33QFA, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYCPLF5GNY642DB27AJ22DQ4YZQNANCNFSM4KEOELLA.