From 3efaf7c9463261fb2d182a7ae00d9045a2b273b8 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Tue, 12 May 2026 13:50:45 -0500 Subject: Migrating to OAuth Authentication (#2374) Co-authored-by: aglowinthefield <146008217+aglowinthefield@users.noreply.github.com> Co-authored-by: Jonathan Feenstra <26406078+JonathanFeenstra@users.noreply.github.com> --- src/modlistviewactions.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/modlistviewactions.cpp') diff --git a/src/modlistviewactions.cpp b/src/modlistviewactions.cpp index 9f289678..1f043ae7 100644 --- a/src/modlistviewactions.cpp +++ b/src/modlistviewactions.cpp @@ -230,12 +230,13 @@ void ModListViewActions::checkModsForUpdates() const QString()); NexusInterface::instance().requestTrackingInfo(m_receiver, QVariant(), QString()); } else { - QString apiKey; - if (GlobalSettings::nexusApiKey(apiKey)) { + NexusOAuthTokens tokens; + if (GlobalSettings::nexusOAuthTokens(tokens) || + GlobalSettings::nexusApiKey(tokens.apiKey)) { m_core.doAfterLogin([=]() { checkModsForUpdates(); }); - NexusInterface::instance().getAccessManager()->apiCheck(apiKey); + NexusInterface::instance().getAccessManager()->apiCheck(tokens); } else { log::warn("{}", tr("You are not currently authenticated with Nexus. Please do so " "under Settings -> Nexus.")); @@ -310,12 +311,13 @@ void ModListViewActions::checkModsForUpdates( if (NexusInterface::instance().getAccessManager()->validated()) { ModInfo::manualUpdateCheck(m_receiver, IDs); } else { - QString apiKey; - if (GlobalSettings::nexusApiKey(apiKey)) { + NexusOAuthTokens tokens; + if (GlobalSettings::nexusOAuthTokens(tokens) || + GlobalSettings::nexusApiKey(tokens.apiKey)) { m_core.doAfterLogin([=]() { checkModsForUpdates(IDs); }); - NexusInterface::instance().getAccessManager()->apiCheck(apiKey); + NexusInterface::instance().getAccessManager()->apiCheck(tokens); } else log::warn("{}", tr("You are not currently authenticated with Nexus. Please do so " "under Settings -> Nexus.")); -- cgit v1.3.1