-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure oauth implementation within jelix php framework #2931
Comments
Well, look at what the error says - it wants an instance of the
|
Ah, you're missing one thing. It's not enough to simply have a method named
and don't forget that this is namespaced, so you'll need to add this at the top of your file:
|
Hey there, i have following smtp log output
|
Your code is now working correctly, but you still have an auth problem. I suggest you look at the wiki about this, and also read about how others have solved auth problems with Microsoft services. |
What 'scope' permissions are you using? |
OAUTH_SCOPES = 'openid profile offline_access user.read mailboxsettings.read calendars.readwrite SMTP.Send Mail.Send email'; |
Try just “offline_access https://outlook.office.com/SMTP.Send” |
i tried it didn't work... gona have some sleep and take it back on tomorrow, i might be busy on this for to long so far (started this workout 14 hours ago) Thanks for the help, really greatefull... |
thanks for the links, i'm digging them out (i read them before as well, but i might have missed something somehow) |
Worth checking that you are presenting an access token and not a refresh token, since the one shown in your diagnostics is not jwt parsable with or without a base64 decode. |
Hello,
i'm implementing oauth in a project based on jelix framework (php framework).
Jelix has a jMailer class that depends on PHPMAILER.
so, i have following class that authentificates a user within azure ad (i added a function to return getOauth64 as in example of phpmailer)
in a controller i tried following code :
And this is returning following error:
TypeError: PHPMailer\PHPMailer\PHPMailer::setOAuth(): Argument #1 ($oauth) must be of type PHPMailer\PHPMailer\OAuthTokenProvider, string given, called in pathtocontroller on line 31 in pathtophpmailervendor\vendor\phpmailer\phpmailer\src\PHPMailer.php on line 5122
any ideas on how i could solve this problem?
The text was updated successfully, but these errors were encountered: