Hi guys,
I’m trying to upload my HTML5 game. I don’t want to iFrame it, rather I’ll upload it directly on Y8. I created a new game entry at [HTTPS]://account.y8[.COM]/applications. It is asking to provide a redirect URL. What should I put there? And I cannot save the application entry without filling it. But I don’t want to redirect it to someplace else.
If I enter the main page URL of my game there ([HTTPS]mytestdomain[.COM]/test
), then when I click on any login button like in the example doc ([HTTPS]://docs.y8[.COM]/docs/javascript/js-getting-started/) here:
<a href="https://my-redirect-url.com" onclick="ID.login(authCallback);">Login</a>
<script>
var authCallback = function (response) {
if (response) {
console.log(response, response.authResponse.details);
}
}
window.idAsyncInit = function () { // SDK downloaded
ID.init({
appId: '662a04c57b8250bca2d779f0'
});
ID.Event.subscribe('id.init', function () { // SDK initialized
ID.getLoginStatus(function (data) { // Try Autologin
if (data.status == 'not_linked' || data.status == 'uncomplete') {
ID.login(loginCallback); // Connect/Request permission
} else {
// Not logged in
}
});
});
};
</script>
it is getting automatically redirected to that page even before the login process is complete:
If I did not set the href
here like this:
<a onclick="ID.login(authCallback);">Login</a>
<script>
var authCallback = function (response) {
if (response) {
console.log(response, response.authResponse.details);
}
}
window.idAsyncInit = function () { // SDK downloaded
ID.init({
appId: '662a04c57b8250bca2d779f0'
});
ID.Event.subscribe('id.init', function () { // SDK initialized
ID.getLoginStatus(function (data) { // Try Autologin
if (data.status == 'not_linked' || data.status == 'uncomplete') {
ID.login(loginCallback); // Connect/Request permission
} else {
// Not logged in
}
});
});
};
</script>
then after login, I’m getting this error:
{"result":null,"authResponse":null,"success":false,"error":"bad_request","error_description":"redirect_uri `https://mytestdomain.com/test/` is not allowed. Please check application config on account.y8.com"}
Can anyone please help me?
PS: sorry, the Forum rules are not allowing new users to post links.