Answered

How to set getToken response

  • 11 November 2020
  • 2 replies
  • 519 views

Hi there,

 

I want to use Embed miro board.

So, I implements frontend plugin referring below.

https://developers.miro.com/docs/editable-boards-for-anonymous-users

 

Then, I have a question.

When we use miroBoardsPicker.open, what kind of values should be passed to getToken property?

In the document, they say only we should generate jwt in server side.

I want to knouw actual type of the property.

 

Regards,

icon

Best answer by Daniela Gavidia 11 November 2020, 17:02

View original

2 replies

Userlevel 4
Badge

Hi Kenya,

 

The getToken() property should be a function that returns a promise that resolves to the JWT. Its type is () => Promise<string>. So, if you already had generated the JWT, you could set getToken to be:

getToken: () => Promise.resolve(MY_JWT)

where MY_JWT is a string of Base64-URL strings separated by dots generated as described here: https://jwt.io/introduction/

Does this answer your question?
Kind regards.

 

Daniela

Developer Experience Team

Hi Daniela,

 

Thanks a lot!

I will try to set Promise<string> as getToken property.

 

By the way, I want to know when does this JWT token is used.

It seems like I can get both new board iframe and existed board iframe with setting getToken property as void function.

Do you have any idea about that?

 

Regards,

 

 

Reply