Hi,
I am trying the Google oAuth2 for the first time.
I came across the following, and followed the steps from the link below:
I think I did something wrong somewhere, but can't work out where I have gone wrong.
I downloaded the example from the link above.
I am using it in B4A v12.80.
Running on a Pixel 8 with Android 14.
For testing, I am using the People API as per the example.
I kept everything the same and only changed the following:
Google Console
Created a new project. I called it 'PeopleAPITest'
I enabled the Google People API
Opened the 'Credentials' tab on the left of screen
It then says 'To create an OAuth client ID, you must first configure your consent screen'
I then selected User Type: External (as I can't select internal since it's only available for Google workplace)
App Name: PeopleAPITest
User support email: I selected my email from the list.
Developer email: I entered my email.
I clicked on Save & Continue on the Scopes.
Users, I added my developer email, and then clicked Save & Continue.
Clicked on 'Create credentials' and then selected 'OAuth client ID'
Application ID: Android
Name: Android client 1
Package name: b4a.peopleapitest
SHA-1 certificate fingerprint: In B4A I selected Tools - Private Sign Key and selected SHA1 from Certificate fingerprints 24:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:5A
It now shows a Client ID.
B4A
Changed the B4A app package name to b4a.peopleapitest
Changed the ClientId in the sample B4A app with the ClientID from Google Console as above.
When I run the project, and then tap on 'Get Data' it opens a chrome browser on my phone, and shows a message on the page saying Access Blocked, the request is invalid.
The email on the webpage on the phone shows my developer email, and is the same one I used above.
When I tap on 'error details' it shows:
Error 400: invalid_request
Custom URI scheme is not enabled for your Android client.
Anyone know where I have gone wrong ?
I am trying the Google oAuth2 for the first time.
I came across the following, and followed the steps from the link below:
[class][B4X] Google OAuth2
GoogleOAuth2 class is compatible with B4A, B4i and B4J (new). It is no longer possible to use WebView to implement Google's OAuth2 authentication. The solution is to open the default browser and set the redirection uri in such a way that the browser will redirect the response back to our app...
www.b4x.com
I think I did something wrong somewhere, but can't work out where I have gone wrong.
I downloaded the example from the link above.
I am using it in B4A v12.80.
Running on a Pixel 8 with Android 14.
For testing, I am using the People API as per the example.
I kept everything the same and only changed the following:
Google Console
Created a new project. I called it 'PeopleAPITest'
I enabled the Google People API
Opened the 'Credentials' tab on the left of screen
It then says 'To create an OAuth client ID, you must first configure your consent screen'
I then selected User Type: External (as I can't select internal since it's only available for Google workplace)
App Name: PeopleAPITest
User support email: I selected my email from the list.
Developer email: I entered my email.
I clicked on Save & Continue on the Scopes.
Users, I added my developer email, and then clicked Save & Continue.
Clicked on 'Create credentials' and then selected 'OAuth client ID'
Application ID: Android
Name: Android client 1
Package name: b4a.peopleapitest
SHA-1 certificate fingerprint: In B4A I selected Tools - Private Sign Key and selected SHA1 from Certificate fingerprints 24:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:5A
It now shows a Client ID.
B4A
Changed the B4A app package name to b4a.peopleapitest
Changed the ClientId in the sample B4A app with the ClientID from Google Console as above.
When I run the project, and then tap on 'Get Data' it opens a chrome browser on my phone, and shows a message on the page saying Access Blocked, the request is invalid.
The email on the webpage on the phone shows my developer email, and is the same one I used above.
When I tap on 'error details' it shows:
Error 400: invalid_request
Custom URI scheme is not enabled for your Android client.
Anyone know where I have gone wrong ?