Skip to content
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

Login.parameters correction #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions src/cordova_googleplus.mli
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,24 @@ module Login : sig

type error = Ojs.t

type scopes

val scopes :
profile:string ->
email:string ->
?others:(Ojs.t -> string) list ->
unit ->
scopes
[@@js.builder] [@@verbatim_names]

val user : ?id_token:string -> ?server_auth_code:string -> unit -> user
[@@js.builder] [@@js.verbatim_names]

val parameters :
?web_client_id:string ->
?offline:bool ->
?id_token:string ->
?server_auth_code:string ->
?profile:string ->
?email:string ->
?scopes:Ojs.t list ->
?user:user ->
?scopes:scopes ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scopes is just a string

user is an output of the login function, not a parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can "scopes" just be a string?

From what I read in the library:

<< The default scopes requested are profile and email (always requested). To request other scopes, add them as a space-separated list to the scopes parameter. They will be requested exactly as passed in. Refer to the Google Scopes documentation for info on valid scopes that can be requested. For example, 'scope': 'https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/tasks'. >>

From what I can tell it seems that "scopes" should at least be a "string list".

unit ->
parameters
[@@js.builder] [@@js.verbatim_names]
Expand Down