
zux80 (zux80) asked a question.
Here's my code:
<!doctype html>
<html lang="en">
<head>
<script src="https://ok1static.oktacdn.com/assets/js/sdk/okta-signin-widget/2.16.0/js/okta-sign-in.min.js" type="text/javascript"></script>
<link href="https://ok1static.oktacdn.com/assets/js/sdk/okta-signin-widget/2.16.0/css/okta-sign-in.min.css" type="text/css" rel="stylesheet" />
<link href="https://ok1static.oktacdn.com/assets/js/sdk/okta-signin-widget/2.16.0/css/okta-theme.css" type="text/css" rel="stylesheet" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<title>Hawx Redirect</title>
<style>
h1 {
margin: 2em 0;
}
</style>
</head>
<body>
<div id="messageBox" class="jumbotron">
Please Log In.
</div>
<div class="container">
<div id="okta-login-container"></div>
</div>
<script type="text/javascript">
var oktaSignIn = new OktaSignIn({
baseUrl: "https://MYORGNAME.okta.com",
clientId: "0oa3ymf2hryoAMTtu697",
authParams: {
issuer: "https://MYORGNAME.okta.com/oauth2/default/.well-known/oauth-authorization-server",
responseType: ['token', 'id_token'],
display: 'page'
}
});
if (oktaSignIn.token.hasTokensInUrl()) {
oktaSignIn.token.parseTokensFromUrl(
// Interact with authentication server if they attempt to sign in.
function success(res) {
var accessToken = res[0];
var idToken = res[1];
oktaSignIn.tokenManager.add('accessToken', accessToken);
oktaSignIn.tokenManager.add('idToken', idToken);
window.location.hash = '';
},
function error(err) {
console.error(err);
}
);
} else {
oktaSignIn.session.get(function (res) {
// Let use know of active user sessin if they're still logged in.
if (res.status === 'ACTIVE') {
document.getElementById("messageBox").innerHTML = "Hello, " + res.login + "! You are logged in already.";
return;
}
// If the user is not logged in, then render new login widget.
oktaSignIn.renderEl(
{ el: '*okta-login-container' },
function success(res) { },
function error(err) {
console.error(err);
}
);
});
}
</script>
</body>
</html>
The Issue is when I attempt to sign in and authenticate all the happens is I get a page saying "{"errorCode":"E0000022","errorSummary":"The endpoint does not support the provided HTTP method","errorLink":"E0000022","errorId":"oaenpNcfV1OTdm0o8_ZachUfg","errorCauses":[]}" I need to get this fixed soon, thanks for taking a look.

Hello @zux80 (zux80) Thank you for reacting out to our Community!
The problem here seems to be the issuer Your issuer is: "https://MYORGNAME.okta.com/oauth2/default/.well-known/oauth-authorization-server", should be : "https://MYORGNAME.okta.com/oauth2/default", assuming of course you have API AM.
Also it seems you are using a very old widget version 2.16 and we are up to widget v7.2.2
Please also see these guides:
https://developer.okta.com/docs/guides/archive-embedded-siw/main/ (Classic) https://developer.okta.com/docs/guides/embedded-siw/main/#about-the-embedded-okta-sign-in-widget (OIE)
The Okta Community Catalysts Program is now live. Collect online badges when you participate in the Okta Help Center Questions community. Learn more here.
Community members help others by clicking Upvote or Select as Best on responses. Try it today.