We are creating alexa skill and trying to do account linking. We have setup the below steps so far for account linking :
Setup Authorization URI API
https://[abcapp].herokuapp.com/userdetails/accountlinking
For Authorization API we are redirecting on AWS account login URL. Please see below URL
https://www.amazon.com/ap/oa?client_id={0}&scope=profile&response_type=code&state={1}&redirect_uri={2}
Here redirect_uri is our custom signup URL
https://[abcapp].herokuapp.com/userdetails/signup
In signup page we are calling web request for url https://api.amazon.com/auth/o2/token to get access_token and refresh_token
In signup page we ask user to input details and save these details in our database for future interaction with alexa skill to manage user details in database
After successfully authentication, we are redirecting on following URL :
https://pitangui.amazon.com/spa/skill/account-linking-status.html?vendorId=[VenderID]&token_type=Bearer&access_token={0}&state={1}&code={2}
When we are trying to connect alexa skill, I am successfully able to login with AWS , after that I am able to enter user details on signup page. Now we are redirecting user to alexa linking status page but we are getting error as "We were unable to link at this time"
Please see attached screenshot:
Can anyone help on this ?
Related
I have an app that all works fine for authentication and it uses Oauth2 (Google).
Now, I am struggling with the logout URL for this app. It works, but I am under the impression that it is possible to logout of it and remain logged into my gmail account please? Currently, ALL accounts are logged out of so the two gmail accounts need to go through login each time the app is used and log out is pressed.
I have read that this is possible but this is the URL that I am using to Log out
https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=http://news.bbc.co.uk
I am sure it can be done because I did it in a former role but do not have the code!
As of now I cannot seem to get my Alexa skill linked with twitter. Currently, I have a node/express server running on EBS which, I am using passport-twitter to handle the oauth part of the authentication. Right now my flow is such:
Enable skill in Alexa app
Click 'sign in to account' in alexa app
Twitter Login screen is displayed and I enter user name and password then click Login button
get redirected to Amazon provided url for callback once authenticated and get an 'Unable to link you skill'.
I login and everything, so I think issue is with redirection, which is defined in the twitter auth callback on my express server like so:
app.get('/auth/twitter/callback',
passport.authenticate('twitter', {failureRedirect: '/login'}),
function(req, res){
var redirectUrl= 'https://pitangui.amazon.com/spa/skill/account-linking-status.html?vendorId=M28J2SR508CPU9#state='
+state+'&access_token='+myToken+'&token_type=Bearer';
res.redirect(302, redirectUrl);
});
My redirect url, minus the sensitive data, is
https://pitangui.amazon.com/spa/skill/account-linking-status.html?vendorId=M28J2SR5BLAH#state=&access_token=&token_type=Bearer
Any ideas on how to debug/troubleshoot as well as any suggestions to fix issue would be awesomely appreciated.
You have a hash ('#') before the 'state' URL parameter. Perhaps you meant for that to be an ampersand ('&')?
https://pitangui.amazon.com/spa/skill/account-linking-status.html?vendorId=M28J2SR5BLAH&state=&access_token=&token_type=Bearer
I am using instagram API in my client's app. This is a kind of a social networking app with profiles for each user. In this app, there is a section which displays instagram recent pictures of a person on their profile page. The issue is that I'm having to log the user in every time they go to view the profile in the instagram section. Can we have it so the user only has to login once and never again?
In other apps like Tinder, we login only once and then our profile is connected to instagram - even if you close the app. This means the app is either storing instagram credentials or the pictures. But latest documentation on instagram developer portal says don't store login credentials or pictures. How can I mimic this behaviour in our app?
For the login purpose, you can retrieve the access token for the particular use which you can store and for the every data retrieval request you can use that access token to get data without making user login again till the access token is valid
to get an access token you can follow the Instagram guide : Instagram: User Authentication
Which is like
Direct the user to our authorization URL. If the user is not logged
in, they will be asked to log in. The user will be asked if they
would like to grant your application access to her Instagram data.
Client Side login
For the images for another user,If you want the public feed of the user you can get directly if you already have the username of the Instagram user by making a get request without need of authentication/access token
https://www.instagram.com/{user-name of Instagram user for which you have to retrieve the media}/media/
Ex: https://www.instagram.com/instagram/media/ , this will return json with the public feed images
Can an application check if anybody is logged into Facebook application in mobile ,if logged in get the user email Id from that and use it in their application?
To get a logged in users email address, you would have to authenticate with the API and the user would have to approve you using the Oauth workflow.
You can display a customized login / connect button using the Facebook API but if I recall correctly, that is an iframe that is embedded in your page, and you never see the email from that.
tldr; No. You need to authenticate using the Oauth workflow and have the user grant you permission.
First you have to authenticate user and then you can get logged in user profile information. For that you have to use Facebook API. Please check below link.
https://developers.facebook.com/docs/facebook-login/ios/v2.2
I want to implement social media log-in feature to my site where I have to allow users to use their existing Google or Facebook credentials to log-in to my site.
I read some articles and found learned that for Google log-in, I need to use Google+ API. So I added some Javascript and HTML code in my HTML page and tried to log in but I am getting following error.
401. That’s an error.
Error: invalid_client
Application: mytestapplication
You can email the developer of this application at: shekhar#gmail.com
no registered origin
I tried to create new OAuth ID but already there are too many IDs and I am not able to delete any one of them. I have tried all the client-id present for this application but none of the client-id is working.
Can anyone please tell how do I implement sign-in with google feature? How to delete and create new client-id?
The last line is important:
no registered origin
On the API Credentials page, click Edit Settings under the Client ID for web application section. Put your URL there (http://example.com).