-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better api useage for developers #1510
Comments
what's different between having lifetime api key and lifetime token ? |
This is question is like why openai or big companies make apikeys and why they don't just create life time token for users and users use it
Also its not clever way if you use user token for a production app Solution: Create a cli command like token, apikey or etc and when it trigger it gives a random generated token that store it in database |
services they provide api key give different access level to users with there key, we don't have such a thing in marzban |
You kinda right about first part but jwt tokens are save in browsers cookie and having a no expire jwt token means if someone some how get access to your browser he can login in panel forever so the difference between jwt and apikey is here JWTs are for saving user credentials and apikeys for using in production services Before I enable unlimited token expire I use to use marzpy and login everytime for every request and that cause a corrupted database and the whole day I'm was trying to restore my backup As I said the solution too easy just create a new table on SQLalchamy then create insert, delete and update function and link it to cli Unfortunately I don't have time to do this task unless I do this by my own hope you or someone else do this and it would be create |
first of all you don't need to login for every login , you can login when ever last token expired (default its 24h) |
So this isn't casual as a production to handle logins and tokens |
If you can add a page that we be able to create api key it would be great login into user every time its awkward and also I don't want to make api key expire to infinity for security reason
The text was updated successfully, but these errors were encountered: