# Issue with SSO authentication

**URL:** <https://forums.eveonline.com/t/issue-with-sso-authentication/91790>\
**Category:** Third Party Developers\
**Created:** [July 23, 2018, 5:58pm UTC](https://forums.eveonline.com/t/issue-with-sso-authentication/91790 "2018-07-23T17:58:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Krueger](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/jan_krueger/32/183861_2.png) [@Jan\_Krueger](https://forums.eveonline.com/u/Jan_Krueger)\
**Post date:** [July 23, 2018, 5:58pm UTC](https://forums.eveonline.com/t/issue-with-sso-authentication/91790/1 "2018-07-23T17:58:47Z")

</div>

Hey community,  
I have issues with my SSO authentication for my eve online web-app.  
I am using axios to make a post request, so I can trade the callbackCode to a accessToken.  
This is my code:

this.axios({  
method: ‘post’,  
url: ‘[https://login.eveonline.com/oauth/token](https://login.eveonline.com/oauth/token)’,  
data: {  
headers: {  
‘Content-Type’: ‘application/x-www-form-urlencoded’,  
‘Authorization’: ‘Basic [Base64code]’,  
‘crossDomain’: true  
},  
body: “grant\_type=authorization\_code&code=”+callbackCode  
}  
}).then(response =\> {  
this.postBody = response;  
})

callbackCode is the code that is extracted from the URL, it gets me the correct code, so theres not the problem.  
When I do the request using a restlessClient extension I do get a propper response. But using this I dont. The error is the following:

> -OPTIONS [https://login.eveonline.com/oauth/token](https://login.eveonline.com/oauth/token) 404 (Not Found)

> -Failed to load login.eveonline .com/oauth/token: Response to preflight request doesn’t  
> pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the  
> requested resource. Origin [My URL] is therefore not allowed access. The  
> response had HTTP status code 404.

> -Uncaught (in promise) Error: Network Error  
> at t.exports (createError.js:16)  
> at XMLHttpRequest.p.onerror (xhr.js:87)

Can anyone help me with this?

Sincerly,  
Jan

---

<div class="post-metadata">

**Author:** ![EveDataRules](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/evedatarules/32/52946_2.png) [@EveDataRules](https://forums.eveonline.com/u/EveDataRules)\
**Post date:** [July 23, 2018, 6:07pm UTC](https://forums.eveonline.com/t/issue-with-sso-authentication/91790/2 "2018-07-23T18:07:33Z")

</div>

looks like a CORS issue, should not be making OPTIONS requests.

Also are you trying to use refresh\_token flow in a client side web app?! That’s not recommended as you cannot protect the secret key.

---

<div class="post-metadata">

**Author:** ![Jan\_Krueger](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/jan_krueger/32/183861_2.png) [@Jan\_Krueger](https://forums.eveonline.com/u/Jan_Krueger)\
**Post date:** [July 23, 2018, 7:06pm UTC](https://forums.eveonline.com/t/issue-with-sso-authentication/91790/3 "2018-07-23T19:06:46Z")

</div>

Okay, I have switched to JQuery now, cause im more familiar with it. This is my new request:

> $.ajax({  
> data: “grant\_type=authorization\_code&code=”+callBackParam,  
> headers: {‘Authorization’: ‘Basic …’},  
> success: function (data){  
> console.log(data);  
> },  
> url: “[https://login.eveonline.com/oauth/token](https://login.eveonline.com/oauth/token)”,  
> method: “POST”  
> })

But I cant seem to get a post request working with a Auth Header and without preflight/options

I am completly confussed now, cause you cant make a OPTIONS request, but you cant make a POST request with a Authorization header without CORS, but you require that header for the request according to the eve docs  
Can someone clarify this for me

EDIT: I have managed to get it working, using implicit method

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/eveonline/original/3X/4/1/41ec4921cbaca7a6f9ea556e7cc20018461eae5e.png) [@system](https://forums.eveonline.com/u/system)\
**Post date:** [October 21, 2018, 7:06pm UTC](https://forums.eveonline.com/t/issue-with-sso-authentication/91790/4 "2018-10-21T19:06:48Z")

</div>

Closed on October 21, 2018, 7:06pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
