# What is the equivilent of \`connectionScope\` in Auth0-SPA-JS?

**URL:** <https://community.auth0.com/t/what-is-the-equivilent-of-connectionscope-in-auth0-spa-js/85741>\
**Category:** Get Help\
**Tags:** auth0-spa-js, swift, ios\
**Created:** [June 22, 2022, 5:23pm UTC](https://community.auth0.com/t/what-is-the-equivilent-of-connectionscope-in-auth0-spa-js/85741 "2022-06-22T17:23:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jgleason/32/25904_2.png) [@jgleason](https://community.auth0.com/u/jgleason)\
**Post date:** [June 22, 2022, 5:23pm UTC](https://community.auth0.com/t/what-is-the-equivilent-of-connectionscope-in-auth0-spa-js/85741/1 "2022-06-22T17:23:44Z")

</div>

Currently I have the following in my spa…

```auto
    createAuth0({
      domain: "...",
      client_id: "...",
      redirect_uri: window.location.origin,
      prompt: "consent",
      useRefreshTokens: true,
    }),

```

A coworker did the following for the native driver…

```auto
Auth0
            .webAuth(session: .shared, bundle: Bundle.main)
            .scope("...")
            .audience("...")
            .connectionScope("https://www.googleapis.com/auth/contacts.readonly,https://mail.google.com/")
            .parameters(["access_type":"offline", "approval_prompt":"force"])
            .audience("...")

```

The question is with regards to the connection scope. I don’t see an equivalent in the spa library. Would that just be using the client cred and user endpoint to get the Google Access token or what would I do for similar functionality?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [June 24, 2022, 8:14pm UTC](https://community.auth0.com/t/what-is-the-equivilent-of-connectionscope-in-auth0-spa-js/85741/4 "2022-06-24T20:14:48Z")

</div>

Hey @jgleason!

I haven’t tested this myself, but you could try adding the `connection_scope` option to your configuration - See:

> **[Add Scopes/Permissions to Call Identity Provider APIs](https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#2-pass-scopes-to-authorize-endpoint)**
>
> Describes how to add scopes to your IdP connection.

Keep us posted!

---

<div class="post-metadata">

**Author:** ![jgleason](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jgleason/32/25904_2.png) [@jgleason](https://community.auth0.com/u/jgleason)\
**Post date:** [June 27, 2022, 2:57pm UTC](https://community.auth0.com/t/what-is-the-equivilent-of-connectionscope-in-auth0-spa-js/85741/6 "2022-06-27T14:57:58Z")

</div>

Sure it might take me a bit but I will try just adding it and seeing what happens. I didn’t just try it because I didn’t see it in the code.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 12, 2022, 2:58pm UTC](https://community.auth0.com/t/what-is-the-equivilent-of-connectionscope-in-auth0-spa-js/85741/7 "2022-07-12T14:58:08Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
