fix: clear old auth record before device code flow to force fresh login
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dd9e2f4acd
commit
40c9607598
11
app.py
11
app.py
@ -436,14 +436,13 @@ async def trigger_poll():
|
|||||||
def cli_auth():
|
def cli_auth():
|
||||||
"""Run Azure device code authentication from terminal."""
|
"""Run Azure device code authentication from terminal."""
|
||||||
database.init_db()
|
database.init_db()
|
||||||
graph = GraphAPI()
|
# Clear old auth record to force fresh device code flow
|
||||||
if graph.is_authenticated():
|
database.set_setting("azure_auth_record", "")
|
||||||
print("Bereits authentifiziert.")
|
|
||||||
return
|
|
||||||
print("Starte Azure Device Code Authentifizierung...")
|
print("Starte Azure Device Code Authentifizierung...")
|
||||||
print("Bitte den angezeigten Code im Browser eingeben.")
|
print("Bitte den angezeigten Code im Browser eingeben.\n")
|
||||||
|
graph = GraphAPI()
|
||||||
graph.authenticate()
|
graph.authenticate()
|
||||||
print("Authentifizierung erfolgreich!")
|
print("\nAuthentifizierung erfolgreich!")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user