Trying to create a login on my site using soundcloud - authentication

Can someone explain to me how i can have people register to my site by loggin in with soundcloud?
The same thing that facebook has but i want it for soundcloud so i can verify they are who they say they are. Please help!!

Have you checked out SoundCloud's OAuth2 process?
http://developers.soundcloud.com/docs/api/authentication#authorization-code-flow
Once your SoundCloud App is setup you can easily trigger the process from JavaScript
( http://developers.soundcloud.com/docs/javascript-sdk#authentication ), then in your custom redirect_uri callback exchange the OAuth token for a SoundCloud access token.
Retrieving the access token proves that the user is logged into SoundCloud and "are who they say they are." (Persist that access token against the user account your server if you require subsequent authenticated SoundCloud API access on behalf of that user.)

Related

Auth0 Guest user login and Rest API login

Lately I started looking into PoC with Auth0 for our use case where we want to allow users to login with Google and Facebook, also want Guest user to login and access our API and once guest user choose to login with Google and Facebook then we can link guest user so that their data will be served once logout.
Here's the things which I am to able to do till now with PoC:
Able to Login with Google and Facebook through client App.
Access authenticated API after getting bearer token from client App.
Things which still need to do, I tried to search but couldn't found good resource:
I want user to login as Guest user and latter if they want they can login with Google/FB and link their account.
Also, I am looking into Rest login API in Auth0 so that we can hit login API after getting access token from Google/FB and register user into Auth0 and get the token for API access.
It would be great if anyone help me on above two points. Thanks!

Is there any way to authenticate users with instagram in my ionic app?

I want to know if someone could already do something like this, because the new Instagram basic display API is kind of different. Thanks in advance
I've been working in a Ionic 3 app, which authenticated users with Instagram API. But now Instagram API is no longer working, and was migrated to Facebook.
With the new API, Facebook no longer allows users to authenticate into an app using the Instagram Basic Display API, and the Graph API for Businesses and Creators requires a Facebook token.
I suppose they now want you to only use the Facebook auth flow to authenticate your users for your app, and then have them log in again to Instagram for Basic Display after your primary authentication.
"Data returned by the API cannot be used to authenticate your app
users or log them into your app. If you need an authentication
solution we recommend using Facebook Login instead."
https://developers.facebook.com/docs/instagram-basic-display-api
&
"All endpoint requests must include a Facebook User access token."
https://developers.facebook.com/docs/instagram-api/overview

Twitter API: allow authenticated user to post tweets on another user's behalf

Twitter API allows to update "the authenticating user’s current status", as explained in the documentation page.
What I'd like to achieve instead is to update another user's current status. Consider a magazine's twitter account. I'd like different people to be able to update the magazine's status. Tweetdeck allows this, but it also allows a whole lot of other things like access to Direct Messages. I only want to provide certain authenticated users an interface (similar to Twitter's post-a-tweet interface) to post status and images to the shared account.
I could not find a simple explanation of how to use Twitter API to achieve the above functionality. Could someone please help?
If you have an app that implements the status update API and it is delivered to different people and they authorize the app with the magazine's twitter account, then the app will update that status. I can show an example also with code if this is what you're asking. However the main point is that, once a user has authorized the app, she/he doesn't need to be connected with the shared login any longer because the app will do that on the magazine's behalf.
BTW, similar question here: Twitter API: post on behalf of whom?
Edit
Just to summarize the comments:
The standard OAuth authentication requires the following main steps
1) to develop an app (registered with OAuth consumer key and secret) that implements the API update status 2) to install and authorize the app: during this step the onwer will be requested to enter the credentials of the passive account in a Twitter link opened with the browser, 3) then - after a fallback - the app will store the access token and any user of the app will be able to update the status without login
Once you have developed an app that can post tweets on behalf of a passive twitter account using the standard OAuth, you could make that functionality available to the authenticated users of a website.

The use of FacebookAuthProvider in apps

I've been working with ServiceStack for quite some time now and i love it. But there is one thing i can't figure out.
How are app's (ios, android etc.) that are using my servicestack endpoints, suppose to use the facebook endpoint "/auth/facebook"?
When using this url "/auth/facebook" from the browser it works fine, but the response is html, and not an AuthResponse og something serializable.
Is this endpoint only to be used from websites with servicestack in the same solution?
The way that stuff works is by redirecting the user to Facebook with an API key that matches your app. The user then tells Facebook that your app is ok, and Facebook redirects them back. This can only be done via a browser. You really have two options to work around this:
Make the user authenticate with Facebook using a website and then authenticate your user with credentials from the app.
Use the built in iOS Facebook stuff and send the resulting auth tokens to an endpoint on your app, where you can save them for later use.
Edit, a bit more clarification:
Option 1
User Goes to your website
User Clicks on your Auth With Facebook button
User is sent your your Facebook endpoint set up in Service Stack
User is redirected by Service Stack to Facebook
User is redirected back to Service Stack from Facebook, with a token in the url
You save the token in your database and tell the user they can now user your app with Facebook.
Option 1.5
The same as Option 1 but instead of making the user go through their browser you create a UIWebView control and point it to your Facebook Auth endpoint. Then you listen for a response from your site that says the user is authenticated. I'm not a objective c, so I can't really get more detailed on how to do that.
Option 2
Use the iOS Facebook API and handle authentication as seen here.
POST the credentials to Service Stack via a Custom Endpoint
Save credentials in the db, and use them in the future to make calls on behalf of the user.
Facebook Login requires a browser of some sort, because Facebook's cookies must be passed along with a request to authorize your website. That is how Facebook knows which of it's users wants to authorize your site, and that they are the ones making the request.

Manage Facebook authentication tokens

We are currently introducing facebook and twitter login functionality for our users both on our website as well as mobile app.
The current issue I have is with facebook tokens, I have noticed that when a user tries logging through facebook the token returned on my website and mobile app are different.
What is the best way to manage these tokens to prevent duplicate registration of users. Each user when logs in creates a basic profile in our database which is linked to the access token. I also use offline_access permission.
Now when this user uses the mobile app a different token is returned and a duplicate profile may be created. How do I prevent this situation, I need the same profile to be detected on the website as well as mobile.
The way you do it is, don't identify users by their access tokens, but by their Facebook user ids.
Just GET https://graph.facebook.com/me?access_token=ACESS_TOKEN and you will be returned the basic information about the user, which includes their Facebook user id.
Just like what Julio said, refer this question for more information. You should use the generated token to verify fb user id
Devise Omniauth and Iphone/Android App