use existing provider with new ClientId fails at getting the access token

Bug #1421461 reported by Boren Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Online Accounts setup for Ubuntu Touch
Expired
Undecided
Unassigned

Bug Description

I am using the existing google provider to log in my app that requires google drive privilege. I provide my own ClientId, ClientIdSecret, RedirectUri and Scope in my .service file. The authorization process stop at url "http://localhost/?code=<access_token>".

"http://localhost/" is my RedirectUri. "http://localhost/?code=<access_token>" shows up after the " the user has granted permission to my app.

I notice that few apps use a custom ClientId based on existing provider. They either have new providers or existing provider already has enough privilege for application to use. I wonder whether someone has done this before.

my .service file:
<service>
    <type>googledrivescope</type>
    <provider>google</provider>
    <name>Drive Scope</name>
    <template>
        <group name="auth/oauth2/web_server">
            <setting name="ClientId">68272877916-b4rvbf5e8a064hast9qpgg7329lepeqq.apps.googleusercontent.com</setting>
            <setting name="ClientSecret">**********</setting>
            <setting type="as" name="Scope">['https://www.googleapis.com/auth/drive']</setting>
            <setting name="RedirectUri">http://localhost</setting>
        </group>
    </template>
</service>

my .application file:
<application>
    <services>
        <service id="com.ubuntu.developer.bobo1993324.googledrivescope_googledrivescope">
            <description>Search google drive files</description>
        </service>
    </services>
</application>

How I invoke online account:
inside Query::run()
...
    unity::scopes::OnlineAccountClient oa_client("com.ubuntu.developer.bobo1993324.googledrivescope_googledrivescope", "googledrivescope", "google");
...

Revision history for this message
Alberto Mardegan (mardy) wrote :

Hi Boren, could you please enable signond debugging by typing this command on a terminal:

    echo "LoggingLevel=2" > ~/.config/signond.conf

and then try again? Then please attach the /var/log/syslog file here, making sure that you replace all access tokens with "XXXXX".

Changed in ubuntu-system-settings-online-accounts:
status: New → Incomplete
Revision history for this message
Boren Zhang (bobo-324) wrote :

Hi Alberto, I can't find log /var/log/syslog, after I run command $echo "LoggingLevel=2" > ~/.config/signond.conf and restart.
I see /var/log/syslog in my desktop but not on my touch device.

I did these from the online account tutorial and get the log attached below.
  export OAU_LOGGING_LEVEL=2
  export OAU_DAEMON_TIMEOUT=9999
  online-accounts-service

Hope it can be helpful to you.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Online Accounts setup for Ubuntu Touch because there has been no activity for 60 days.]

Changed in ubuntu-system-settings-online-accounts:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.