esoreq / dcarte

Dcarte code
https://esoreq.github.io/dcarte/
9 stars 9 forks source link

tokenless usage #12

Closed MathildaSu closed 1 year ago

MathildaSu commented 2 years ago

Is there a way to add a token into my code somewhere, or save it in a file, so when starting up I don't get the token promt but use the already provided token directly?

esoreq commented 2 years ago

What do you mean?

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Ting Su @.> Sent: Tuesday, August 16, 2022 1:55:04 PM To: esoreq/dcarte @.> Cc: Subscribed @.***> Subject: [esoreq/dcarte] tokenless usage (Issue #12)

This email from @.*** originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders listhttps://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.

Is there a way to add a token into my code somewhere, or save it in a file, so when starting up I don't get the token promt but use the already provided token directly?

— Reply to this email directly, view it on GitHubhttps://github.com/esoreq/dcarte/issues/12, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIMOSDUBNZGJKCQEOKVODJLVZNXQRANCNFSM56VLCTSA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

MathildaSu commented 2 years ago

it usually prompts for the login token when i load (because i use a container), but it's a bit tricky to put in the token when deploying the container to azure. So i wonder if i can added it in the code so that it automatically login.

esoreq commented 2 years ago

Oh so within the container this would require some adjustments. We need to chat - perhaps next week

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Ting Su @.> Sent: Tuesday, August 16, 2022 4:52:53 PM To: esoreq/dcarte @.> Cc: Soreq, Eyal @.>; Comment @.> Subject: Re: [esoreq/dcarte] tokenless usage (Issue #12)

This email from @.*** originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders listhttps://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.

it usually prompts for the login token when i load (because i use a container), but it's a bit tricky to put in the token when deploying the container to azure. So i wonder if i can added it in the code so that it automatically login.

— Reply to this email directly, view it on GitHubhttps://github.com/esoreq/dcarte/issues/12#issuecomment-1216669509, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIMOSDUS7YJC4LPAV36PD3LVZOMLLANCNFSM56VLCTSA. You are receiving this because you commented.Message ID: @.***>

MathildaSu commented 2 years ago

I think there might be a workaround with this. can we add a line to check if there is a environment viriable to use before asking to input the token? I can update the env regularly to reflect the token update. Such as:

try:
    toekn = os.getenv('DCARTE_TOKEN')
esoreq commented 2 years ago

Why not use the environment token dcarte sets ? os.getenv('MINDER_TOKEN')


From: Ting Su @.> Sent: Thursday, August 18, 2022 2:23:08 PM To: esoreq/dcarte @.> Cc: Soreq, Eyal @.>; Comment @.> Subject: Re: [esoreq/dcarte] tokenless usage (Issue #12)

This email from @.*** originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders listhttps://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.

I think there might be a workaround with this. can we add a line to check if there is a environment viriable to use before asking to input the token? I can update the env regularly to reflect the token update. Such as:

try:

toekn = os.getenv('DCARTE_TOKEN')

— Reply to this email directly, view it on GitHubhttps://github.com/esoreq/dcarte/issues/12#issuecomment-1219374335, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIMOSDX6LFNI3N4UPHGD6C3VZYMJZANCNFSM56VLCTSA. You are receiving this because you commented.Message ID: @.***>

MathildaSu commented 2 years ago

Oh i didn't notice it was already there. i will simply set that then. thank you

MathildaSu commented 2 years ago

fixed in https://github.com/esoreq/dcarte/pull/13