use aio-lib-state and aio-lib-file in web-src?

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

525 likes

Total Posts

1,020 posts

Correct reply

257 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

12-09-2020

Having an app scren, is it possible to use the libraries aio-lib-state or aio-lib-files and access the data? eg. I want to have some "basic logs" save somewhere and display it on an app screen (component). or do I need to write an action fetching the desired data and then display the response?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 25
Employee
duypnguyen
Employee

Likes

36 likes

Total Posts

173 posts

Correct reply

32 solutions
Top badges earned
Give Back 25
Boost 25
Applaud 5
Give Back 5
Give Back 3
View profile

Avatar
Give Back 25
Employee
duypnguyen
Employee

Likes

36 likes

Total Posts

173 posts

Correct reply

32 solutions
Top badges earned
Give Back 25
Boost 25
Applaud 5
Give Back 5
Give Back 3
View profile
duypnguyen
Employee

14-09-2020

Hi @ursboller , it is possible to use aio-lib-state and aio-lib-files in the UI components in `web-src/`, same as any nodejs code. However it does not have the built-in authentication like in the backend action which leverages the namespace credentials to obtain access tokens to State and Files. You would have to manage the authentication in your code. IMO this is not a secure way of using State and Files libs because there are too many vulnerability risks in the frontend code. The best way would still going through the action with `require-adobe-auth` enabled.

Answers (0)