summaryrefslogtreecommitdiff
path: root/src/modlistviewactions.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2026-05-12 13:50:45 -0500
committerGitHub <noreply@github.com>2026-05-12 13:50:45 -0500
commit3efaf7c9463261fb2d182a7ae00d9045a2b273b8 (patch)
tree8cc2c9f14d8cffe73187cf42ce8141c87bccef32 /src/modlistviewactions.cpp
parent41ffb25c03956d1c6619c284e821611e70bcc307 (diff)
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>
Diffstat (limited to 'src/modlistviewactions.cpp')
-rw-r--r--src/modlistviewactions.cpp14
1 files changed, 8 insertions, 6 deletions
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."));