# Best practice, for connecting with web-app

**URL:** <https://forums.creativeclouddeveloper.com/t/best-practice-for-connecting-with-web-app/4535>\
**Category:** UXP Plugin API\
**Created:** [April 18, 2022, 6:34pm UTC](https://forums.creativeclouddeveloper.com/t/best-practice-for-connecting-with-web-app/4535 "2022-04-18T18:34:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobjoern](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@Tobjoern](https://forums.creativeclouddeveloper.com/u/Tobjoern)\
**Post date:** [April 18, 2022, 6:34pm UTC](https://forums.creativeclouddeveloper.com/t/best-practice-for-connecting-with-web-app/4535/1 "2022-04-18T18:34:26Z")

</div>

Hey there,  
I’m currently developing a photshop plugin, which allows users to upload their designs directly to my web-app, where the users have an account, which is secured by an email and password (abridged version).  
This means, users have to log into my plugin, with the account from the web-app, and get a token, which is then sent to my servers.  
I’m wondering what the best practice is for logging a user in, I currently see two ways:

1. Integrate a login form into the plugin itself, send it to my server, return a JWT, and save it in the PS storage
2. Implement an OAuth flow, meaning my web-app is opened in the browser, the user can login, and the token is saved in the PS storage

Is there a prefered way of doing this? Personally I favor option 1, as it is easier to implement on my end.

Thanks  
Tobias
