What are MetaScopes and how can I find what I need to add? | Community
Skip to main content
Level 2
September 25, 2020
Solved

What are MetaScopes and how can I find what I need to add?

  • September 25, 2020
  • 2 replies
  • 3750 views

I have been using this example using `@adobe/jwt-auth` to try and authenticate my external service to invoke my Project Firefly app.

My config is like...

 

export default { credentials: { clientId : 'client id', technicalAccountId : 'account id', orgId : 'org', clientSecret : 'secret', metaScopes : 'ent_user_sdk', // This comes from the example privateKey : '-----BEGIN PRIVATE KEY-----\n' + 'My Private Key/n' + '-----END PRIVATE KEY-----\n', }, };

 

When I try to auth now I get the error...
The metascopes in the JWT are not a subset of the metascopes in the binding
I'm not actually sure what a metascope is and how I can find which metascopes are valid.
Thanks
Oliver
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by duynguyen_adobe

Hi @oliverf82757722 - for JWT token handling, we recommend to use @adobe/aio-lib-ims which is supported by Project Firefly. As a side note, regardless of the JWT library being used, it's important that your action in that case should not be exposed as a web action, which makes it accessible to the public.

W.r.t. meta scopes, you should put them in an array, e.g. `metaScopes : ['ent_user_sdk']`.

2 replies

Level 2
September 25, 2020
The rubber duck effect works again. 😄 About 2 mins after writing this I went back to the docs to keep looking and stumbled upon the list of metascopes here... https://www.adobe.io/authentication/auth-methods.html#!AdobeDocs/adobeio-auth/master/JWT/Scopes.md And now it's working 😄 Thanks
duynguyen_adobeAdobe EmployeeAccepted solution
Adobe Employee
September 25, 2020

Hi @oliverf82757722 - for JWT token handling, we recommend to use @adobe/aio-lib-ims which is supported by Project Firefly. As a side note, regardless of the JWT library being used, it's important that your action in that case should not be exposed as a web action, which makes it accessible to the public.

W.r.t. meta scopes, you should put them in an array, e.g. `metaScopes : ['ent_user_sdk']`.

Level 2
September 25, 2020
Ah excellent thanks. I'll update to that. I used that following the code sample here... https://www.adobe.io/content/udp/en/authentication/auth-methods.html#!AdobeDocs/adobeio-auth/master/JWT/samples/samples.md WIll update to the aio-lib-ims though. Thanks