# Issues specifying a dot (.) in the "scope=" URL parameter string

**URL:** <https://community.developer.atlassian.com/t/issues-specifying-a-dot-in-the-scope-url-parameter-string/80518>\
**Category:** Atlassian Developer Tools\
**Tags:** oauth2, 3lo, scopes, jira-cloud, rest-api\
**Created:** [June 3, 2024, 7:41pm UTC](https://community.developer.atlassian.com/t/issues-specifying-a-dot-in-the-scope-url-parameter-string/80518 "2024-06-03T19:41:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PatrickEthier](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@PatrickEthier](https://community.developer.atlassian.com/u/PatrickEthier)\
**Post date:** [June 3, 2024, 7:41pm UTC](https://community.developer.atlassian.com/t/issues-specifying-a-dot-in-the-scope-url-parameter-string/80518/1 "2024-06-03T19:41:02Z")

</div>

The app registration says I should submit the following:

```auto
https://auth.atlassian.com/authorize?
audience=api.atlassian.com
&client_id=${YOUR_CLIENT_ID}
&scope=read%3Ajira-work%20read%3Ajira-user%20write%3Ajira-work
&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foidc-callback
&state=${YOUR_USER_BOUND_VALUE}
&response_type=code
&prompt=consent

```

The OIDC library uses javascript’s URL library to URLEncode the scope:

```auto
scope='read.jira-work read.jira-user write.jira-work';
const parsedUrl = new URL(url);
parsedUrl.searchParams.append("scope", scope);

```

The request outputs the following:

```auto
https://auth.atlassian.com/authorize?
audience=api.atlassian.com
&client_id=${YOUR_CLIENT_ID}
&scope=read.jira-work+read.jira-user+write.jira-work
&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foidc-callback
&state=fc85c8006c9249f3b9a4767403320ed4
&response_type=code
&prompt=consent
&code_challenge=${SOME_CHALLENGE}
&code_challenge_method=S256
&response_mode=query

```

The resulting redirect JWT seems to no translate the scope= in the redirect to the consent screen. If I manually replace the (.) with %3A ( and leave the + to replace the spaces), then the consent screen appears. The Challenge and reponse mode don’t seem to matter whether they are there or not, it really is a problem with [auth.atlassian.com](http://auth.atlassian.com) not reading the URLEncoded scope string with a (.) in it.

The JWT that is sent to the **consent** endpoint([api.atlassian.com/oauth2/authorize/server/consent?context=](http://api.atlassian.com/oauth2/authorize/server/consent?context=))

```auto
{
  "nbf": 1717518930,
  "iss": "auth.atlassian.com",
  "iat": 1717518930,
  "exp": 1717522530,
  "aud": "api.atlassian.com",
  "user_id": "${YOUR_USER_ID}",
  "redirect_uri": "/authorize?client_id=${YOUR_CLIENT_ID}&redirect_uri=http://localhost:3000/oidc-callback&response_type=code&state=478494ea55824be3a18a2e2d83b6ba0c&code_challenge=m-rXUpzzd-cFSIPc4UwuHPHBdgOhrkckHO9GkUXj1C8&code_challenge_method=S256&response_mode=query&prompt=consent&audience=api.atlassian.com&scope=&csrf_token=718d6bec-cf5c-4a98-91fc-76147cdc23ca",
  "client": {
    "client_id": "${YOUR_CLIENT_ID}
    "name": "Portal",
    "logo_uri": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/default-avatar.png"
  }
}

```

Notice the scope= from the above request doesn’t get translated (probably because the auth service logic can’t parse it with the dots(.) in the scope names)

Is there a bug on the auth service side that doesn’t process the (.) in the scope string as intended?

---

<div class="post-metadata">

**Author:** ![DeepakPandey](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@DeepakPandey](https://community.developer.atlassian.com/u/DeepakPandey)\
**Post date:** [June 25, 2024, 7:23am UTC](https://community.developer.atlassian.com/t/issues-specifying-a-dot-in-the-scope-url-parameter-string/80518/3 "2024-06-25T07:23:01Z")

</div>

Hi @PatrickEthier ,

Could you provide a sample reproducible application that uses the OIDC library? This would help us reproduce this issue locally and troubleshoot it further.

Are you also seeing an error when you use: in the scope? Or is the issue only faced with the scope that uses dot(.)? If not with the clone, you can use `read:jira-work`, `write:jira-work`, and `read:jira-user` as mentioned in the [document](https://developer.atlassian.com/cloud/jira/platform/scopes-for-oauth-2-3LO-and-forge-apps).

Best regards,  
Deepak Pandey  
Developer Support Engineer

---

<div class="post-metadata">

**Author:** ![PatrickEthier](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@PatrickEthier](https://community.developer.atlassian.com/u/PatrickEthier)\
**Post date:** [June 25, 2024, 11:33am UTC](https://community.developer.atlassian.com/t/issues-specifying-a-dot-in-the-scope-url-parameter-string/80518/4 "2024-06-25T11:33:52Z")

</div>

You can use the urls from the developer tab and replace the %3A with dots and user the developer tab of your browser to see what is happening.

Dots don’t need to be urlescaped according to RFC.

The colon worked, but the dot thing is a bug, your oidc code is not rfc compliant.
