403 Error for user verification (API) - amazon-web-services

I have an Web application that require users to verify their email account after registration. It works when we run it locally and current server.
However when we migrate it to the a staging server, the verification brings the below error.
POST http://www.XXXXXXXXX.org/api/account/verify 403 (Forbidden)
Can i ask if anyone have any idea on this?
Thank you!
Jo

Related

Email verification not working with deployed django app on heroku

I've deployed a django website with Heroku. When a user creates an account in the app, a validation email is supposed to be sent. Do do that, I'm using smtp from gmail, and in my account settings, I've activated "less secure app access".
This works perfectly fine on my local machine, but when using the deployed app, I can't get the email to be sent.
The first time, I got a security warning from google saying someone connected to my account. I said it was me and tried again. I didn't get any other security warning but it seems the app is still unable to send emails.
Please, let me know if you have any idea what the issue might be.
Thanks.

Google OAuth throwing edirect_uri_mismatch error

I am attempting to add Google Authentication to my Django project. I have been able to configure my project to work with my app on Heroku using a different Oauth client object but I can't seem to get it to work for my development server.
I keep getting the error:
Error: redirect_uri_mismatch
The JavaScript origin in the request, http://localhost:8000, does not match the ones authorized for the OAuth client.
from Google.
My Authorized Javascript origin is:
https://localhost:8000
http://localhost:8000
My Authorized Redirect URIs are:
https://localhost:8000
https://localhost:8000/
https://localhost
http://localhost:8000
http://localhost:8000/
http://localhost
(I tried all of these combos based on comments from similar questions.)
Any help or advice would be much appreciated as I can't seem to find the answer to this anywhere in the API docs.
Each time I changed the Client in the developer console I neglected to make the corresponding update in the Django template. I was using the wrong client the whole time - careless mistake.

Transaction Failure in payment gateway Authorize.net

I have installed authorize.net sdk(PHP) and changed config file. I am running the sample app that comes along with the bundle.
When I proceed with the payment, the transaction fails and responses below error
"We're sorry, but we can't process your order at this time due to the following error:
The merchant login ID or password is invalid or the account is inactive.
response code 3
response reason code 13"
Naturally you need to verify your login credentials are correct. Also, make sure you are using the right server. You can use the production server or development server for testing. If you mix up your credentials that will cause this also.

django-allauth google integration gives "Social Network Login Failure" error

I am working on an external site to integrate django-allauth for facebook and google login. Facebook worked almost out of the box. However, with Google I get the "Social Network Login Failure" error.
Here is what I have done:
1.Google APIs console: Client ID for web applications configuration
Client ID: xxxxxxx.apps.googleusercontent.com
Email address: yyyyyyyy#developer.gserviceaccount.com
Client secret: xxx-yyy-zzz-111-222
Redirect URIs: http://learnbuzz.com/accounts/google/login/callback/
JavaScript origins: http://www.learnbuzz.com
2.Created learnbuzz.com site in Sites
3.Created the google app in Social Apps with the Client ID and secret from the google API console.
From the docs and few other SO questions, seems like that is all that is needed.
But, when I log in using google, I get to the accounts.google.com page where it asks the user to accept 'App sharing basic user information and email'. After I accept, it gives me a "Social Network Login Failure" for this url:
http://learnbuzz.com/accounts/google/login/callback/?state=l1WdxOgr26bB&code=4/lGhX6Dum_FNnM3FE39TcULZb1UMX.0jX6biQfm3MfEnp6UAPFm0F0CIGMgQI
What config am I missing?
Edit: I don't know if it matters but it takes the browsers quite some time before it throws out this error.
I've tried to access http://learnbuzz.com/accounts/google/login/callback and it requests http authorization. It is returning a 401 status code.
Probably your browser is already logged in and you can't see this request for authentication.
This page should be accessible from an anonymous browser windows. After you remove the need for authorization, it will work.

django-oauth2-provider

Does any one used django-oauth2-provider as django oauth2 solution?
I've clone django-oauth2-provider code from github https://github.com/caffeinehit/django-oauth2-provider, and run the example site provided.
But I don't know how to test it.
When I type this in my browser:
http://127.0.0.1:8000/oauth2/authorize/2/?client_id=fc79b3fd7e65b904836b
I got
unauthorized_client An unauthorized client tried to access your resources.
It seems that my client_id had failed passed to the site?
You are accessing the wrong URL:
http://127.0.0.1:8000/oauth2/authorize/?client_id=fc79b3fd7e65b904836b&redirect_uri=<REDIRECT_TARGET>&response_type=code&status=abc
Then the app redirects you to
/oauth2/authorize/2/
by either issuing an HTTP200 upon success or HTTP400 upon failure.