Probably a more secure way to do it.
Just make a panel in your user page where you can fetch and invalidate tokens. Use the token to upload instead of having to type in user credentials and then 2-factor inside Unity.