Buildfire App is not able to retrieve user profile using OAuth token - buildfire

We have created an App with Buildfire and set that up for using OAuth 2.0 for user authentication.Below is the setup we have done :
App is able to get token using URL https://xxxx.us?oauth=token but when it goes to https://xxxx.us/oauth/me for getting user profile it is returning error as Could not retrieve profile info.
I have tried figuring out the issue at our end but everything is working fine for us because when I repeated same thing with Postman, I am able to get User profile, below is the reference for that :
I don't know what's wrong with App, Please help me in resolving this issue.
Edit :
Strangely when I am checking console on buildfire site, I am seeing below :
which means app is able to retrieve user profile but it stills giving the same error and not allowing user to login into the app.

Finally I have been able to figure out a solution for my problem. If you are using OAuth server from wp-oauth.com and user profile can't be retrieved from https://xxxx.us/oauth/me then you can try below URL for retrieving user profiles in Buildfire app.
https://xxxx.us/wp-json/wp/v2/users/me

Related

Azure Active Directory get access token

I'm kinda stuck on how to get the access token from a webview login.
I have a link working but after they type in a code / password I want it to send the token back to the client device. How do i do this?
Current redirect uri is https://login.live.com/oauth20_desktop.srf.
In addition, it shows a stay signed in page - how do I disable this?
Lastly it shows another page saying let this app access your info?
Is there any way to get rid of this (getting verified?) so it closes like lunar client after finish.
• I would suggest you to please refer to the below community thread for receiving an authentication token through webview on Android. In this code, you add a ‘WebAppInterface’ in which the android function should accept the token as a parameter after the user has successfully logged in and got his token. In that, you must register the ‘WebAppInterface’ as ‘webView.addJavascriptInterface(WebAppInterface(this), "Android")’ based on which the Web frontend can invoke the function like ‘Android.consumeToken(token);’
For more details, kindly refer the below community thread for reference: -
How do you obtain a Authentication token using WebView in Android?
Also, it depends on the type of applications used by MSAL for your webview application running on Android to achieve SSO, i.e., through a system browser or through a broker application. Therefore, for setting up the same as stated above, ensure that you are putting the below line in the app configuration JSON that is passed to MSAL: -
"authorization_user_agent" : "WEBVIEW"
Thus, when using the in-app WebView, the user signs in directly to the app where the tokens are kept stored in the application itself and still SSO can work effectively. Kindly refer to the below link for more clarification as it describes the required steps to be followed for using SSO and getting an access token through MSAL authentication on webview: -
https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-android-single-sign-on

How to manage user profile authentication in getstream.io?

I am a new developer of https://getstream.io/. I am using NodeJS version. I am able to run the example Example, shows feed, activity, notification and profile. Now, I am trying to manage user profile authentication and trying to add a login and registration page with that project but I am unable to do that. Any help is appreciated.
You need to build a back-end application to manage the connection between your front-end and the Stream API.
Then, after creating a user, just get the user's token (using the createUserToken function.
When you create a user, you can pass the password information in the data object and when you create an endpoint for authentication (ie: retrieving the user's token) don't forget to remove this information from the response.
Hope it helps =)

Testing authentication on nodejs app with facebook test users

I'm testing the Facebook authentication on my nodejs webapp and I'm banging my head against the customization of the content of the test-user's token.
I'm first creating a Facebook test-user with my facebook_app_id.
It gives me an id, an email, a token... And I'm using that last one to create a user on my webapp. This works without problem. There's an 'email' key in that one!
The real test starts here. I'm now trying to log using my Facebook test-user access token. The test fails because there's actually no key 'email' in the access token (which I'm using internally to identify the user).
I've been searching throw the GraphApi documentation to see if there was any way to get that information in the token (like permissions?) in vain.
Any idea? Am I doing something wrong here?

Passing Values through Angular Adalauthenticationservice login

I am creating angular application which involves authentication of user in AzureAD. So I am using ADALJs for authenticating user in AAD.Its working perfectly.
But I want to get some additional information about the user the before moving to adalauthenticationservice.login().Is there any way available to pass the values and get back in redirected URL in adalauthenticationservice.Login().
Thanks in advance.

Authenticate against Azure AD - ColdFusion Web Application

I'm developing a web application which will require users to login before they can use the app. I've looked into using the Azure Active Directory as the resource which I will authenticate against, however I'm having trouble understanding how to set things up.
I've logged into the Azure Portal and have created my Active Directory. I've also added my custom Web App to the Applications area, and provided the App Login URL and APP ID URI. Now I have been given my Client ID and Federation Metadata Document Url, but I have no idea where to go from here.
Could someone provide an example of how I take the username and password which they enter in my login form and submit that to Azure, receiving back a result which would indicate success or failure? Or is that not how it works?
Any help is greatly appreciated. I don't need any other information from the Active Directory other than confirmation that YES, the username and password matches and let them in.
The web application is coded in ColdFusion as per the client's request, and it is hosted on their server.
Thank you!!!
UPDATE
Using the directions found here https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx I have been able to successfully request an authorization code by logging in using an Active Directory account. After I log in, the system redirects me back to my web application, and has a long url code variable, along with a url session_state variable. My question now is, what do I do with this information from my web app?
Using the directions found here
https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx I have
been able to successfully request an authorization code by logging in
using an Active Directory account. After I log in, the system
redirects me back to my web application, and has a long url code
variable, along with a url session_state variable. My question now is,
what do I do with this information from my web app?
If you look at the picture in the link you mentioned, there are 6 steps.
What you have done so far is performed step 1 and 2. Now you would need to perform step 3 and 4 i.e. get an access token using the auth code you have received.
Please see the section titled Use the Authorization Code to Request an Access Token in the same link regarding how to do it.
As part of Step 4, you will get an access token back. It is essentially a JWT token. Not sure how you would do that in Cold Fusion, but you can simply decrypt/parse (for the lack of better words :)) this token to get information about the user.
Given that you only want to find out if the user is authenticated successfully, I believe if you have received the code you're good. You don't have to do anything more.

Resources