diff --git a/app.py b/app.py index ba7b657..74d8c43 100644 --- a/app.py +++ b/app.py @@ -436,14 +436,13 @@ async def trigger_poll(): def cli_auth(): """Run Azure device code authentication from terminal.""" database.init_db() - graph = GraphAPI() - if graph.is_authenticated(): - print("Bereits authentifiziert.") - return + # Clear old auth record to force fresh device code flow + database.set_setting("azure_auth_record", "") 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() - print("Authentifizierung erfolgreich!") + print("\nAuthentifizierung erfolgreich!") if __name__ == "__main__":