Scopes in Access Token are not well formed

My access token after login is not well formed.
This is a fragmet of my payload.

“scope”: “openid , profile , read:posts,create:posts,delete:posts,update:posts”,
“permissions”:

as you can see openid and profile are divided by " , " but the others “,”. Now my spring boot backend can read only openid and profile scope. Can i format this in any way? Im using authorization extension.

this is my rule

    function (user, context, callback) {
      var permissions = user.permissions || [];
      var requestedScopes = context.request.body.scope || context.request.query.scope;
      requestedScopes.split(',').join(' ');
      var filteredScopes = requestedScopes.split(' ').filter( function(x) {
        return x.indexOf(':') < 0;
      });
      
      
      filteredScopes.push(permissions);
      context.accessToken.scope = filteredScopes.join(' ');

      callback(null, user, context);
    }

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?