Python: Authenticate user in client app via SDK
Here's what I'm trying to do:
I wrote a python desktop app and one of the things it does is check for a file locally and if it doesn't find it then it reaches out to my shared box folder and downloads it. Each user will be running their own copy of the app.
Here's the kicker though:
1 - I don't want the user to know what's going on behind the scenes...just that it's fetching the file(s). So I can't use Oauth2 because that requires user interaction.
2 - I want to be able to add/remove users as needed. When they're removed they no longer have access to the share. I'm thinking this involves sending each user some kind of code that they can input in my app that is unique to them.
There are so many options in Box and I'm fairly new to all this authentication mumbo-jumbo so I'm not really sure how to go about setting it all up.
I can authenticate to my own account using JWT but I can't see how to set it up for each user.
I figured it'd be pretty straightforward
- invite new user to top level share
- generate code for new user
- send code to user and tell them to enter it in the app
- profit.
I appreciate any help you are able to provide.
Thanks,
Chad
-
Hey Chad,
First I will say that creating an application that essentially copies the function of Box Drive is not recommended. So if possible, I would steer you in that direction.
In terms of a custom option - if you don't want users to interact with the application OAuth 2.0 will not work.... JWT can assuming that you provide the application with as-user permissions.
Happy to chat further.
Thanks,
Alex, Box Developer Advocate
-
I haven't checked out Box Drive yet so I'll give that look. I just need an online depot where I can store files for the clients to use along with a place where the app can "phone home" to see if there's an update available and download it if so. Does Box Drive have the same Python API available?
Also, this all has to take place in the background. I can't require my users to use another GUI. These aren't exactly tech savvy users I'm dealing with here lol
投稿コメントは受け付けていません。
コメント
2件のコメント