Skip to content

Commit

Permalink
Merge branch 'main' into EzioTheDeadPoet-patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
EzioTheDeadPoet committed May 25, 2024
2 parents ebd50a5 + b59ef4b commit c0782ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### Changelog

#### Version - 3.6.0.0 - 5/25/2024
* Wabbajack now uses OAuth2 for Nexus Mods logins
* Support for DirectURL use with LL files

#### Version - 3.5.0.2 - 5/21/2024
* *HOTFIX* - change how we log into Nexus Mods. We still need to rewrite this on
Oauth2, but this should fix the current issues we have, and get people back up and running
Expand Down
6 changes: 1 addition & 5 deletions Wabbajack.Networking.NexusApi/NexusApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,8 @@ protected virtual async ValueTask<HttpRequestMessage> GenerateMessage(HttpMethod
var userAgent =
$"{_appInfo.ApplicationSlug}/{_appInfo.Version} ({_appInfo.OSVersion}; {_appInfo.Platform})";

if (!AuthInfo.HaveToken())
throw new Exception("Please log into the Nexus before attempting to use Wabbajack");
await AddAuthHeaders(msg);

var token = (await AuthInfo.Get())!;

if (uri.StartsWith("http"))
{
msg.RequestUri = new Uri($"{string.Format(uri, parameters)}");
Expand All @@ -211,7 +208,6 @@ protected virtual async ValueTask<HttpRequestMessage> GenerateMessage(HttpMethod
msg.Headers.Add("Application-Name", _appInfo.ApplicationSlug);
msg.Headers.Add("Application-Version", _appInfo.Version);

await AddAuthHeaders(msg);

msg.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
return msg;
Expand Down

0 comments on commit c0782ce

Please sign in to comment.