How to authenticate external widgets in Next 13
Unanswered
Allegheny mound ant posted this in #help-forum
Allegheny mound antOP
I created a feedback widget which site owners can embed on their website.
Now I'm building the backend in Next 13, this includes a dashboard where site owners can manage their widget, and an API that these widgets will talk to.
For the dashboard, I'll probably use Next-Auth to manage authentication.
However, the widget also need some sort of authentication in order to be able to talk to the API's.
Am I right that API keys are the right choice here? If so:
1. How do I allow my users to generate/change their API key in their dashboard?
2. As the widget will be loaded on the front end, the API key will be visible. What security measures do I need to take here?
Now I'm building the backend in Next 13, this includes a dashboard where site owners can manage their widget, and an API that these widgets will talk to.
For the dashboard, I'll probably use Next-Auth to manage authentication.
However, the widget also need some sort of authentication in order to be able to talk to the API's.
Am I right that API keys are the right choice here? If so:
1. How do I allow my users to generate/change their API key in their dashboard?
2. As the widget will be loaded on the front end, the API key will be visible. What security measures do I need to take here?