{"action":"created","issue":{"url":"https://api.github.com/repos/mohiva/play-silhouette/issues/463","repository_url":"https://api.github.com/repos/mohiva/play-silhouette","labels_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/463/labels{/name}","comments_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/463/comments","events_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/463/events","html_url":"https://github.com/mohiva/play-silhouette/issues/463","id":146836378,"number":463,"title":"Shouldn't use hard code for API","user":{"login":"viennv1709","id":5088270,"avatar_url":"https://avatars.githubusercontent.com/u/5088270?v=3","gravatar_id":"","url":"https://api.github.com/users/viennv1709","html_url":"https://github.com/viennv1709","followers_url":"https://api.github.com/users/viennv1709/followers","following_url":"https://api.github.com/users/viennv1709/following{/other_user}","gists_url":"https://api.github.com/users/viennv1709/gists{/gist_id}","starred_url":"https://api.github.com/users/viennv1709/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viennv1709/subscriptions","organizations_url":"https://api.github.com/users/viennv1709/orgs","repos_url":"https://api.github.com/users/viennv1709/repos","events_url":"https://api.github.com/users/viennv1709/events{/privacy}","received_events_url":"https://api.github.com/users/viennv1709/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-08T07:03:39Z","updated_at":"2016-04-08T07:52:14Z","closed_at":"2016-04-08T07:52:14Z","body":"I have a suggestion is that shouldn't use hard code for API such as Google, Facebook, Twitter, so on. Because API version can change any time depend on providers.\r\n\r\nThese sample codes should be changed.\r\n\r\n```scala\r\nobject GoogleProvider {\r\n\r\n  /**\r\n   * The error messages.\r\n   */\r\n  val SpecifiedProfileError = \"[Silhouette][%s] Error retrieving profile information. Error code: %s, message: %s\"\r\n\r\n  /**\r\n   * The Google constants.\r\n   */\r\n  val ID = \"google\"\r\n  val API = \"https://www.googleapis.com/plus/v1/people/me?access_token=%s\"\r\n}\r\n```\r\n\r\n```scala\r\nobject FacebookProvider {\r\n\r\n  /**\r\n   * The error messages.\r\n   */\r\n  val SpecifiedProfileError = \"[Silhouette][%s] Error retrieving profile information. Error message: %s, type: %s, code: %s\"\r\n\r\n  /**\r\n   * The Facebook constants.\r\n   */\r\n  val ID = \"facebook\"\r\n  val API = \"https://graph.facebook.com/v2.3/me?fields=name,first_name,last_name,picture,email&return_ssl_resources=1&access_token=%s\"\r\n}\r\n```\r\n```scala\r\nobject DropboxProvider {\r\n\r\n  /**\r\n   * The error messages.\r\n   */\r\n  val SpecifiedProfileError = \"[Silhouette][%s] Error retrieving profile information. Error message: %s, status code: %s\"\r\n\r\n  /**\r\n   * The Dropbox constants.\r\n   */\r\n  val ID = \"dropbox\"\r\n  val API = \"https://api.dropbox.com/1/account/info\"\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/mohiva/play-silhouette/issues/comments/207285097","html_url":"https://github.com/mohiva/play-silhouette/issues/463#issuecomment-207285097","issue_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/463","id":207285097,"user":{"login":"akkie","id":307006,"avatar_url":"https://avatars.githubusercontent.com/u/307006?v=3","gravatar_id":"","url":"https://api.github.com/users/akkie","html_url":"https://github.com/akkie","followers_url":"https://api.github.com/users/akkie/followers","following_url":"https://api.github.com/users/akkie/following{/other_user}","gists_url":"https://api.github.com/users/akkie/gists{/gist_id}","starred_url":"https://api.github.com/users/akkie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akkie/subscriptions","organizations_url":"https://api.github.com/users/akkie/orgs","repos_url":"https://api.github.com/users/akkie/repos","events_url":"https://api.github.com/users/akkie/events{/privacy}","received_events_url":"https://api.github.com/users/akkie/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T07:52:14Z","updated_at":"2016-04-08T07:52:14Z","body":"I'll quote the documentation:\r\n\r\nhttp://silhouette.mohiva.com/v4.0/docs/config-oauth2-based-providers\r\n> `apiURL`\r\n\r\n> The URL to fetch the profile from the API. Can be used to override the default URL hardcoded in every provider implementation.\r\n\r\nWas introduced with #434 and is available in version 4.\r\n"}}