jina-ai / clip-as-service

🏄 Scalable embedding, reasoning, ranking for images and sentences with CLIP
https://clip-as-service.jina.ai
Other
12.39k stars 2.07k forks source link

Retrieve authentication token in client side using hubble.get_token #837

Closed alaeddine-13 closed 1 year ago

alaeddine-13 commented 1 year ago

Currently, users who want to authenticate to clip-as-service, need to perform 2 steps:

  1. login using CLI or jina hub website
  2. retrieve and explicitly set the auth token either in environment variable or in the clip-client API.

It would be great if login using CLI were enough (jina auth login). This implies that we retrieve the auth token using hubble.get_token (in addition to the existing methods).

numb3r3 commented 1 year ago

@alaeddine-13 The granted user is not necessary a jina registered user. For example, I created a jina account and create a TOKEN. Then I can share this TOKEN with anybody (e.g., my teammate). Generall, IMO, the authentication token works for the consumer. jina auth login works for the producer. So, at this moment, I would not merge them to make the logic confusing.

ZiniuYu commented 1 year ago

Stay tuned for the inference_client :)