Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-cordova-oauth with Office 365 #81

Open
nhat-tong opened this issue May 28, 2015 · 6 comments
Open

ng-cordova-oauth with Office 365 #81

nhat-tong opened this issue May 28, 2015 · 6 comments

Comments

@nhat-tong
Copy link

Hi nraboy,

I'm interested in your work. It's really cool.

Now, I work with Office 365 API and had the problems when the redirection url returned.
On mobile, it don't know how to resolve it (for display pop-up prompt) (link: https://github.com/auth0/auth0-ionic/issues/8)

I tried to use auth-dialog with an InAppBrowser custom for resolve it but it not work correctly.

So, can I use ng-cordova-oauth for doing the authentication with Office 365 ?

Thanks so much,

Nhat

@nraboy
Copy link
Owner

nraboy commented May 29, 2015

Is Office 365 the same as Windows Live? If yes, then it is currently supported.

If it is not the same, please find me the Oauth documentation for Office 365 and add it to this comment. Then I'll do my own research after that.

Thanks,

@amit777
Copy link
Contributor

amit777 commented Aug 25, 2015

Hi, here is a node module that implements OAuth with Office365. I think it may be different than Windows Live, but I get confused with all the microsoft product names.

https://github.com/QuePort/passport-azure-oauth

Basically you need to register an App in Azure Active Directory (which is free).

@gregmcpugh
Copy link
Contributor

Hi, I can see this post was over 3 months ago now but just encase you are still stuck.
About a week ago I implemented azureAD as a function to this repo, it currently is in development branch.
I was facing the same problems as you when first starting out. If this doesn't help you let me know and I'm sure we can get a wrapper for office365 as well.

@amit777
Copy link
Contributor

amit777 commented Aug 25, 2015

Oh, very cool. Thanks! I'll check out the Dev branch and let you know how it goes. Great project btw

@amit777
Copy link
Contributor

amit777 commented Mar 17, 2016

Hi, I just wanted to check in on this. I've been trying the azuread provider, and I'm close, however I'm getting the follow error. (I have SSO working to Google, Salesforce, and AzureAD on the web, and working with Google and Salesforce with ngCordovaOauth). I mention this because I'm fairly certain my ClientId, Tenant ID is correct. Though I'm not sure about the resource URL below.

My code looks like this (using the current version of the lib 0.2.3):

$cordovaOauth.azureAD('CLIENT_ID', 'TENANT_ID', 'https://api.office.com/discovery/')

I added more debug logging to the library and found this error:

{"error":"invalid_request","error_description":"AADSTS90014: The request body must contain the following parameter: 'client_secret or client_assertion'.\r\nTrace ID: 064559d7-2259-4621-9425-e41a76dccc39\r\nCorrelation ID: 4869e9d7-6e28-4530-98a9-524b65011d5c\r\nTimestamp: 2016-03-17 21:20:15Z","error_codes":[90014],"timestamp":"2016-03-17 21:20:15Z","trace_id":"06455967-2259-4621-9425-e41a76dccc39","correlation_id":"4869e9d7-6e28-4730-98a9-524b65011d5c"}

@amit777
Copy link
Contributor

amit777 commented Mar 17, 2016

I changed the resource URL to match my AppID inside my application, and I now get this error instead..

"error":"invalid_request","error_description":"AADSTS90014: The request body must contain the following parameter: 'client_secret or client_assertion'.\r\nTrace ID: 498a27e7-351f-48e8-807a-c1d72417a6fe\r\nCorrelation ID: 0a440b57-d1f9-4f65-9938-d19e6a1d59df\r\nTimestamp: 2016-03-17

Do you know if the ADAL library and this library are helpful? In the docs, this example requires us to create a "Native Application" in AzureAD rarthre than a webapplication..

https://azure.microsoft.com/en-us/documentation/articles/active-directory-devquickstarts-cordova/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants