Username & password in OAuth2 request - oauth-2.0

I need to login to Dropbox programmatically (in code) IOT upload a file to an app.
All the examples I have found show ...username=xxx&password=yyy...
I am sending "
'https://www.dropbox.com/1/oauth2/authorize?granttype=password&username=GreatDayDan&password=gggggggg&response_type=token&redirect_uri=http%3A%2F%2Flocalhost%3A8765'".
Dropbox replies:
unknown field "username".
So, how should I include the username & password?

My bad, again. Should use api.dropboxAPI.com not www.dropbox.com.

Related

Xcode -GitHub Authentication Failed

I'm trying to access GitHub through Xcode Preferences > Accounts > GitHub but every time I enter my email address and Personal Access Token it fails.
I entered (both manually and c+p) the token from my GitHub in yellow
Xcode:
GitHub Personal access token section:
After looking at your screenshot, it looks like you're uploading the access token name, not the actual access token key. I've provided an example below:
When you first create the token you'll have an option to see the key. The value that appears next to the permissions (what you have in yellow) is just the name of it.

GitHub pull request builder unable to connect to GitHub

Good afternoon.
I'm using plugin version 1.42.0.
Recently I receive a token deprecation notice in my mailbox. I regenerated the token and now I'm not able to connect to Github at all through this plugin.
I tried different types of credentials - email + password, secret text, email + password (where the token is the password), no luck.
Please note that credentials are valid, I'm able to connect to GitHub through other plugins.
Am I missing something very obvious here?
PS. No 2-factor auth is enabled for my account.
I'm not an admin account, but I'm able to read and write everything into the repo.
Well, my bad.
I was so tired, that I did not put a repository name into the field above.
Everything is working now.

AppAuth/OpenID-Connect: Login with username and password possible?

I want to implement login via OpenID-Connect in an iOS App. The AppAuth-SDK seems to be the standard way to do so. After downloading some examples I am a little bit confused. All AppAuth examples and tutorials are working with a WebView in which the user enters username and password. I want to make a native login screen where the user has to enter username and password. Is that even possible with AppAuth? I read something about "resource owner password grant" and "client secret". Is that what I need?
If somebody could push me in the right direction, I would be really thankful.
Think AppAuth-iOS to be a simple set of classes that helps you to build OAuth/OpenID Connect requests and receive responses. Their samples may contain ones which only use WebView with Authorization Code flow. But if you check docs, you can find their class APIs supporting for password grant.
You can build a OIDTokenRequest with related parameters. Here you can use build in grant type OIDGrantTypePassword from OIDGrantTypes. Simply feed in username password obtained from your login mechanism to OIDTokenRequest through additionalParameters. Create the request and obtain the response. I haven't tried this myself, but simply looking at the docs suggests this is the way to go.
Always think about supporting libraries as simple classes that were written to help you. That way things become simple to deal with.

Why emails are not sending on production server?

I'm using the grails plugin "mail=0.9". Emails are not sending on production server. It just works fine on development environment on localhost.
Error is given below;
Stacktrace follows:
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:319)
at org.grails.mail.MailService.sendMail(MailService.groovy:63)
at org.grails.mail.MailService.sendMail(MailService.groovy:46)
at org.grails.mail.MailService$sendMail.call(Unknown Source)
at MailGrailsPlugin$_configureSendMail_closure4.doCall(MailGrailsPlugin.groovy:86)
at com.tkxel.chefvivant.api.SommelierController$_closure4.doCall(SommelierController.groovy:107)
at com.tkxel.chefvivant.api.SommelierController$_closure4.doCall(SommelierController.groovy)
at java.lang.Thread.run(Thread.java:636)
Can anyone help me? Why emails are not sending?
Thanks
Finally, after being spending the much time on this issue. I have fixed this error.
Actually the problem was just about to set the Gmail account settings. Google was sending the hidden captcha and that's obvious machine cannot recognize it. So that's why I was getting authentication error.
Solution:
I just unlocked the Gmail captcha and now it works fine.
Steps to reproduce this
1. Logout your gmail account first.
2. Visit this url https://accounts.google.com/DisplayUnlockCaptcha and then put username and password to login
3. Press "Continue" button to unlock the captcha
4. It will automatically save the settings.
Now, Check your application to hit the url like "Forgot Password" request. You will must receive email. :)
You can also read this article.
http://productforums.google.com/forum/#!topic/gmail/uBdBQAuGeTw
Thanks
javax.mail.AuthenticationFailedException means that you are useing incorrect credentials to access to account you use to send emails.

Magento - doesn't send any email

i have a problem with mail sending: magento doesn't send any mail, i'm trying to use the sendfriend functionality (i've extendend the ProductController of that Sendfriend module), but the problem is about any email (i've tried to do a registration or to change a password, but no email was sent). backend settings seems to be ok:
System->Configuration->system->Mail sending settings->disable Email Communications->No;
System->Configuration->system->Mail sending settings->Host ->locahost;
with the same settings on another local magento installation the system send emails correctly. what can i check?
you don't need to do any coding stuff. Its already available in Magento. You just need to enable the option of Email to a friend from the back-end. Hope this help you.

Resources