# Google OAuth2 issues

**URL:** https://discourse.nodered.org/t/google-oauth2-issues/3489
**Category:** General
**Created:** [27 September 2018 12:31 UTC](https://discourse.nodered.org/t/google-oauth2-issues/3489 "2018-09-27T12:31:51Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![pakerfeldt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pakerfeldt/32/3101_2.png) [@pakerfeldt](https://discourse.nodered.org/u/pakerfeldt)
#### Post date: [29 July 2019 18:44 UTC](https://discourse.nodered.org/t/google-oauth2-issues/3489/10 "2019-07-29T18:44:03Z")

</div>

I managed to get something that seems to be working.

```auto
adminAuth: {
    type:"strategy",
    strategy: {
        name: "google",
        label: 'Sign in with Google',
        icon:"fa-google",
        strategy: require("passport-google-oauth20").Strategy,
        options: {
            clientID: "myId",
            clientSecret: "mySecret",
            scope: "email",
            callbackURL: "http://my-node-url.com/auth/strategy/callback",
            verify: function(token, tokenSecret, profile, done) {
                profile.username = profile.emails.constructor === Array ? profile.emails[0].value : null;
                return done(null, profile);
            }
        },
    },
    users: [
       { username: "my_email@gmail.com",permissions: ["*"]},
       { username: "some_other_user@gmail.com",permissions: ["read"]}
   ]
},

```

---

_[View the full topic](https://discourse.nodered.org/t/google-oauth2-issues/3489)._
