You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if you could toggle a setting to add users to a discord server utilizing the existing oauth features, especially during registration to the website. I've managed to work this work, additionally disabled email registration, forcing everyone on the website to register via discord and join our server.
public function getProvidersAvailable(): array {
$providers = [];
foreach ($this->_providers as $provider_name => $provider_data) {
if (!$this->isSetup($provider_name)) {
continue;
}
$provider = $this->getProviderInstance($provider_name);
$scopes = [
$provider_data['scope_id_name'],
'email',
];
to
public function getProvidersAvailable(): array {
$providers = [];
foreach ($this->_providers as $provider_name => $provider_data) {
if (!$this->isSetup($provider_name)) {
continue;
}
$provider = $this->getProviderInstance($provider_name);
$scopes = [
$provider_data['scope_id_name'],
'email',
];
if ($provider_name == 'discord') {
$scopes[] = 'guilds.join';
}
In addition to the changes above, I've also deleted certain things in template files to remove all ways of possibly creating an account without using discord. We have been happy with it and I wanted to share it with the rest of the NamelessMC community, hopefully y'all can better integrate it with toggles and such in the panel.
The text was updated successfully, but these errors were encountered:
It would be nice if you could toggle a setting to add users to a discord server utilizing the existing oauth features, especially during registration to the website. I've managed to work this work, additionally disabled email registration, forcing everyone on the website to register via discord and join our server.
Changing /register.php
to
Also need to add a function to actually make them join the server.
Changing /oauth.php
to
Changing /NameLessOAuth.php
to
In addition to the changes above, I've also deleted certain things in template files to remove all ways of possibly creating an account without using discord. We have been happy with it and I wanted to share it with the rest of the NamelessMC community, hopefully y'all can better integrate it with toggles and such in the panel.
The text was updated successfully, but these errors were encountered: