Can not install OAuth2 Authentication odoo12 - odoo

I have a problem with installing OAuth2 Authentication in odoo 12.
Error:
Element '<xpath expr="//div[hasclass('o_login_auth')]">' cannot be located in parent view
How can I fix this? And how do I show the google login button on login view?

Have you made changes to your web.login view in Odoo? If you have modified it yourself or by installing modules that modify it, you could be missing the <div class="o_login_auth"/> element. This would result in the error you described.
The Google login button will be visible when you set Allowed = True for the "Google OAuth2" provider in the "OAuth Providers". You can find this setting in Odoo menu Settings / Users & Companies / OAuth Providers. You can find more information about Google OAuth2 login from Odoo documentation at https://www.odoo.com/documentation/user/12.0/general/auth/google.html.
I hope these help you forward. Please update your question and include more detailed information if you request more help from Stack Overflow community.

Related

Access Denied Error while integrating odoo13 with keycloak

I have tried integrating odoo13 with keycloak following the steps given in the website:
https://janikvonrotz.ch/2020/04/24/odoo-oauth-authentication-with-keycloak/
After following the steps, I'm getting keycloak login page when Sign in is clicked in odoo page, validation is also done well but it is redirected to odoo login page with Access Denied Error.
I understand that keycloak creates session upon login, but odoo is unable to get any information after login.
Can anyone help to find where the error is and resolve the issue?
Thanks in advance!!

External Login in react native with JWT authentication token asp.net core

As I am new to mobile development and I am using react native. I am trying to implement external login(Facebook/Google) login, I got libraries using which I am able to get the details of user profile such as firstName, lastName, email from both Facebook and Google. Here my question is, is it right and safe to get details of the user profile, and calling register api to register/login and get the JWT token to land the application to home screen? Or is there any way that we can just click on Facebook/Google button by passing just provider name we can get all details from web api itself.
I feel, fetching the user profile details from web api is safer than getting user profile using react native library/sdk and then calling register api to register/login the same.
If there any link or Github reference please share the same for better and in details understanding.
Thanks In Advance.
You seems to have it figured out yourself. Call Google or other third party to retrieve user details such as email and name. Then call your own backend to register that user to your platform.
The next time user login using social login do a similar call to your backend to check if user with the details exist in your database and send a corresponding response back.
Check this link Google Login React Native. This reference is a little old one but might give you a heads up.
Note: You will need to have corresponding permissions enabled in providers developer console. Some cases you will get an access token after login/signup using social media. You will then need to fetch user data from corresponding provider using their api or SDK.

Issue with OAUTH consent screen

I am trying to get an oauth 2.0 client id but I am redirected to the oauth consent screen. However the google oauth consent screen is giving me errors when I try to save my application name. I left the other fields blank as I was guided my my tutor to only fill up the application name and email field. I am having issues configuring the oauth consent screen. I keep getting an error that says
“the request failed because changes to one of the field of the resource is not supported.”
Its my first time using google oauth and I did everything my tutor did in the udemy course but I hit the save button, I get this same error all day! Please check my screenshots for more details. Any help will be appreciated..
try a unique name for your app
I had the same issue and it worked for me
It's an ongoing outage issue with Oauth Client Id Creation, you can see the banner here https://status.cloud.google.com/
Outage Banner
Should be fixed soon, hopefully!
If you created an api key before the redirection to the oauth consent screen for the app you want to integrate google sign in with, try adding the api key to the scope for google apis on the consent screen This worked for me.
It was a google server issue. I think their server was down at that particular time I was having the issue because the next day I tried it without doing anything different and it worked seamlessly.

Having an issue for Shopify App listing

I have submitted My app to Shopify App store for review, I got below feedback
I was unable to install your app from the App Store listing. I was redirected to this page after clicking 'Get'. When clicking on 'Get' from the app listing, the app should immediately authenticate using OAuth. Please watch this example of what the required installation flow looks like with OAuth when clicking 'Get' from the App Store Listing.
How can I resolve this?
Any help would be greatly appreciated.
When any one click On get button from shopify app store then you must
have to check that after getting store name it will redirect to your
link on which you have check store permissions & all other things for
shopify store. After checking permissions of store it will
automatically redirect to store OAuth page then you will able to
install app.
You can also check itself where it is redirect when any one click on GET button. Steps for checking:-
Login into shopify partner account Go to Apps-> View App Listing. Then you will check by clicking GET button where it is redirect. You have to check conditions & may also you have to set your App Url Link in app which you created in Shopify partner account.
You can also these things on Shopify Official documentation.
Please Let me know if you getting issue after try this. I am Happy to help you. Thanks !!

Modifying Google OAuth2 login page

Is it possible to modify or show a more iOS friendly login page from googles oauth2 services? I'm not sure if I have seen a modified on before but i can't find any information on it. Any help would be appreciated.
I think the only change you can do is to provide your own logo as described here: https://developers.google.com/youtube/2.0/developers_guide_protocol_oauth2#OAuth2_Register
To make the login process more like a part of your application it is possible to open the login page in an embedded browser instead of open it in Safari, but you will not be able to change how it looks.