mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-02-15 08:08:42 -06:00
ID no longer hard coded into discord oauth2 links.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cloudcraftgaming.discal.web.handler;
|
||||
|
||||
import com.cloudcraftgaming.discal.api.object.BotSettings;
|
||||
import com.cloudcraftgaming.discal.api.utils.GuildUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
@@ -40,6 +41,7 @@ public class DiscordAccountHandler {
|
||||
//Not logged in...
|
||||
Map m = new HashMap();
|
||||
m.put("loggedIn", false);
|
||||
m.put("client", BotSettings.ID.get());
|
||||
return m;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
|
||||
<!--TODO: Change this when bot goes live to proper auth url-->
|
||||
<a class="account" th:unless="${loggedIn}"
|
||||
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
|
||||
in</a>
|
||||
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
|
||||
In</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
|
||||
<!--TODO: Change this when bot goes live to proper auth url-->
|
||||
<a class="account" th:unless="${loggedIn}"
|
||||
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
|
||||
in</a>
|
||||
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
|
||||
In</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
|
||||
<!--TODO: Change this when bot goes live to proper auth url-->
|
||||
<a class="account" th:unless="${loggedIn}"
|
||||
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
|
||||
in</a>
|
||||
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
|
||||
In</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
|
||||
<!--TODO: Change this when bot goes live to proper auth url-->
|
||||
<a class="account" th:unless="${loggedIn}"
|
||||
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
|
||||
in</a>
|
||||
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
|
||||
In</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
|
||||
<!--TODO: Change this when bot goes live to proper auth url-->
|
||||
<a class="account" th:unless="${loggedIn}"
|
||||
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
|
||||
in</a>
|
||||
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
|
||||
In</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
|
||||
<!--TODO: Change this when bot goes live to proper auth url-->
|
||||
<a class="account" th:unless="${loggedIn}"
|
||||
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
|
||||
in</a>
|
||||
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
|
||||
In</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
|
||||
<!--TODO: Change this when bot goes live to proper auth url-->
|
||||
<a class="account" th:unless="${loggedIn}"
|
||||
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
|
||||
in</a>
|
||||
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
|
||||
In</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<a class="account" th:if="${loggedIn}" href="/account/logout">Log out</a>
|
||||
<!--TODO: Change this when bot goes live to proper auth url-->
|
||||
<a class="account" th:unless="${loggedIn}"
|
||||
href="https://discordapp.com/oauth2/authorize?client_id=348893450227286017&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin">Log
|
||||
in</a>
|
||||
th:href="'https://discordapp.com/oauth2/authorize?client_id=' + ${client} + '&scope=guilds+identify&permissions=0&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A4567%2Faccount%2Flogin'">Log
|
||||
In</a>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
Reference in New Issue
Block a user