Connection error: Can not authenticate to IMAP server: [ALERT] Please log in via your web browser - server

I am using a php script to connect imap.gmail.com, I have a paid google app account. It was working but after some time I am getting following error
it says I have to login from browser but my CentsOS vps server does not have a browser its command prompt only
I am using mydomain.com
Fatal error: Uncaught exception 'ImapMailboxException' with message 'Connection error: Can not authenticate to IMAP server: [ALERT] Please log in via your web browser: https://support.google.com/mail/acco' in /xxxxxx/classes/ImapMailbox.php:51 Stack trace: #0 /home/theluxla/public_html/_backoffice/mailpilot/classes/ImapMailbox.php(42): ImapMailbox->initImapStream() #1 /xxxxxx/classes/ImapMailbox.php(114): ImapMailbox->getImapStream() #2 /xxxxxx/mail.v3.php(28): ImapMailbox->searchMailbox('ALL') #3 {main} thrown in/xxxxx/classes/ImapMailbox.php on line 51

Google replied to me:
Thank you for your message. I understand you're having issues connecting your application with our IMAP server, I'll be happy to help. I didn't want to bother with a call this early, reason why, I'm sending this email instead
In this case, it seems this error is related to the access to "Less secure apps" disabled for the user you're trying to connect via IMAP. Please follow these steps to solve this issue:
In your Admin Console, follow the steps available at this support article https://support.google.com/a/answer/6260879?hl=en under the section "Enabling less secure apps to access accounts".
Log in as the affected user and follow the steps to "Allow less secure apps to access your account" as described at this support article https://support.google.com/accounts/answer/6010255.
I hope this information is helpful. Your case will remain open for three business days and it will auto close if no reply is received. Feel free to reply to this message if you need more help, I'll be happy to continue assisting you.
Sincerely,
David

In may case, Gmail block my server IP
So do the below step to solve this thing.
You need to first Sign in - Google Accounts
https://accounts.google.com
You probably need to go here and follow the instructions:
https://accounts.google.com/b/0/DisplayUnlockCaptcha

Change Gmail accounting setting:-
Enable IMAP.
Status: IMAP is enabled

https://myaccount.google.com/u/2/security-checkup?utm_source=google-account&utm_medium=web&continue=https%3A%2F%2Fmyaccount.google.com%2Fu%2F2%2Fsecurity
In the “Third-party access” tab turn ON less secure app access
Try to access, you will still be denied
https://myaccount.google.com/u/2/security-checkup?utm_source=google-account&utm_medium=web&continue=https%3A%2F%2Fmyaccount.google.com%2Fu%2F2%2Fsecurity
in the “Recent security events” tab you will find a note about your last access, tell that it was you and you will be able to access

In my case none of the proposed answers helped. All options were checked: IMAP -enabled, Less secure apps - enabled, this instruction: https://accounts.google.com/b/0/DisplayUnlockCaptcha also didn't work.
POSSIBLE PROBLEM: use of multiple Gmail accounts (when you connected to many Gmail account and can switch connections). Also if you use the browser like Chrome with profile signed to one of the Google Accounts. In my situation the instruction: https://accounts.google.com/b/0/DisplayUnlockCaptcha didn't work, because I was primarily using browser Chrome profile of my personal Google account, but was working on connection 3rd party app that was using another Google account.
MY SOLUTION. I've added another Chrome profile (corresponding to 3rd Party Gmail Account), switched from my personal profile to working one. And only after that the instruction of https://accounts.google.com/b/0/DisplayUnlockCaptcha gave the positive result. Hope it will save few hours for you.

Related

Configure Authentication for actual html login page

We've got an install of Azure Devops server that currently authenticates against our active directory server and authentication works, but it appears to do so by means of browser basic authentication (the browser modal prompt that asks for a simple user name and password).
I'm wondering if there is some way to configure authentication such that users that have never logged in, actually get a login page... not just the basic authentication prompt in the browser.
I appreciate any input, I've used and administered azure devops in the cloud for a LONG time, but the devops server stuff I'm new to.
NOTE: I've played with IIS settings for authentication (enabling and disabling basic authentication and forms auth etc, but nothing really seemed to help there)
it appears to do so by means of browser basic authentication (the
browser modal prompt that asks for a simple user name and password).
I'm wondering if there is some way to configure authentication such
that users that have never logged in, actually get a login page... not
just the basic authentication prompt in the browser.
What's the login page do you mean?
1.If you mean the login page to connect to TFS web portal, as I know using basic prompt with username+password is the only appraoch.
Web Portal:
Only logic page:
2.But if you mean something used for authentication when accessing the code. I think you must be familiar with PAT which is widely used in Azure Devops Service. IIS Basic Authentication is not recommended. You can check Enabling IIS Basic Authentication invalidates using Personal Access Tokens and Use the TFS Cross Platform Command Line with TFS using basic authentication or personal access tokens (PATs).
Hope it helps to resolve your puzzle :)
So after lots of research, I found that in the differences between azure devops server and azure devops services documentation. In this documentation it states that it uses windows authentication, and you will never be presented with any login experience.
I'd vote that this should be something that be configured to show a login screen, as sometimes we want to log in as users other than the users we logged into the machine as.

IBM API Connect developer portal admin link missing

I have setup an API Connect developer portal in the sandbox catalog (I've been following the basic tutorials about configuring an API developer portal found here).
I receive a message saying that i'll get a one time login link so that i can login to the portal as admin and reset my password. However, this never arrives. I have tried configuring the portal a number of times now and this link never comes. Therefore i'm unable to login as admin.
I've also tried using the 'request new password' option on the developer portal itself and entering my email but this also does not work
Is there a way I can retrieve the login link?
This could be a number of things:
1) the IBM emails often get flagged as spam
2) the IBM email server, or rather the people they've contracted this out to, doesn't fully comply with DKIM/SPF security, so if you are on a corporate server that requires this then you won't get your emails.
The workaround I've done in the past is spin up a gmail account and be sure to check my spam folder.

Action on Google Unlink/Link needed every hour

I can sync and send commands to my devices with my GH action.
But after 1 hour, I always get "I'm sorry, there was an error and I'm unable to control your home device."
Nothing is sent to my cloud function action.
When I unlink the service and link it again all works as expected.
How can I troubleshoot this problem?
Btw I used Google Sign-In for OAuth and account linkling.
You can't use accounts.google.com/o/oauth2/v2/auth & googleapis.com/oauth2/v4/token anymore. They might work in the test version of your app but your app will not be published unless you implement your own OAuth server. This means setting up your own Auth and Token endpoints (or just Auth if you use the implicit flow) where the user can log in and authenticate with your service.

Google for Work not connected to Google Developers Console

We have been using Google for Work for years now and have a domain setup thru godaddy. We got it so we would have a descent email server without having to worry about it. I then signed up for the Google Developers Console to expand the options we have available and move our local apache/php business software to the cloud. I correctly setup a project with a lamp instance which also works great.
Problem is I cant add projects thru the
https://console.developers.google.com/project?authuser=0
it returns
Error Developers Console has not been activated for your account.
Your account may be suspended or disabled. If you are a Google Apps
user, ask your domain administrator to enable Apphosting Admin on your
account.
But from here I can add new projects
https://code.google.com/apis/console
If I goto the Google for Work console App Engine apps it says
No services have been installed.
Add services to your domain
I click the link to add the service
and goto the Other Services
Google App Engine Provide existing Google App Engine services to your
users.
Enter App ID:*
What is the App ID? I have already authorized the domain we are using for the services.
If I goto Google for Work Domain admin and try to add the other domain we have it says
We are sorry, but you do not have access to Webmaster tool. Please log
in to your Admin Console to enable Webmaster tool. Learn more
Its also adding the domain name to the Project ID: which causes this error in the SDK console
:\Program Files\Google\Cloud SDK>gcloud compute ssh
example.com:api-project-??????? --zone us-central1-a ERROR:
(gcloud.compute.ssh) Could not fetch instance:
- Invalid value 'example.com:api-project-???????'. Values must match the following regular expression: '[a-z](? z0-9]{0,61}[a-z0-9])?'
Im really confused
Go to admin.google.com, login with our organisation account, go to Apps -> Additional Google Services -> Enable the services you need.

Connect to visualstudio.com from Team Explorer Everywhere CLC

I'm trying to connect from Team Explorer Everywhere command line client on Windows to a Team Foundation Service project at visualstudio.com, but I get "access denied" messages.
The username and password I'm passing are definitely correct, and are the email and password from my microsoft live ID used to create the account. I have no problems accessing the service through the website, or via Visual Studio 2012 on a different machine.
tf workspace /new /server:https://<something>.visualstudio.com/defaultcollection
Username: example#microsoft.com
Password: ********
Any ideas? One thought I had was that maybe the '#' character in the e-mail was causing the username to be interpreted as a Windows domain, or that maybe SSL wasn't being used correctly?
You cannot authenticate with a Live ID using the Team Explorer Everywhere command-line client. We cannot raise a web browser from the client and capture the Live ID authentication tokens in a secure way across platforms.
Instead, you need to set up alternate credentials as described at https://tfs.visualstudio.com/en-us/home/news/2012/aug-27/ .
If anyone is has received this error after March 18th 2014, this is because the password requirements for visualstudio.com have been tightened.
If all of a sudden you get this message 'Failed to erase credential: Element not found
fatal: Authentication failed for 'https://*.visualstudio.com/defaultcollection/_git/*/''
I was able to solve it by deleting my alternate credentials, and recreating them (at which point I also found out my old password wasn't usable anymore).