{"action":"created","issue":{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/553","labels_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/553/labels{/name}","comments_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/553/comments","events_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/553/events","html_url":"https://github.com/lucadegasperi/oauth2-server-laravel/issues/553","id":108208941,"number":553,"title":"Changing the oauth2 database","user":{"login":"mrgswift","id":2319364,"avatar_url":"https://avatars.githubusercontent.com/u/2319364?v=3","gravatar_id":"","url":"https://api.github.com/users/mrgswift","html_url":"https://github.com/mrgswift","followers_url":"https://api.github.com/users/mrgswift/followers","following_url":"https://api.github.com/users/mrgswift/following{/other_user}","gists_url":"https://api.github.com/users/mrgswift/gists{/gist_id}","starred_url":"https://api.github.com/users/mrgswift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrgswift/subscriptions","organizations_url":"https://api.github.com/users/mrgswift/orgs","repos_url":"https://api.github.com/users/mrgswift/repos","events_url":"https://api.github.com/users/mrgswift/events{/privacy}","received_events_url":"https://api.github.com/users/mrgswift/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-24T20:33:59Z","updated_at":"2015-09-25T00:11:16Z","closed_at":null,"body":"Hello,\r\n\r\nI was wondering if there is a way to change the database connection that oauth2 connects to get credentials. The project I am working on requires the credentials database to be separate from any other database. Basically I need the api server to be able to receive access_tokens.  So the api server would have read access to specific tables in the credential database.\r\n\r\nI already added the credentials database to config/database.php, but I can't seem to find a convenient way to change the database for oauth2 to the database on the credentials server.  Am I missing something?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/comments/143086158","html_url":"https://github.com/lucadegasperi/oauth2-server-laravel/issues/553#issuecomment-143086158","issue_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/553","id":143086158,"user":{"login":"Harry1986","id":9990070,"avatar_url":"https://avatars.githubusercontent.com/u/9990070?v=3","gravatar_id":"","url":"https://api.github.com/users/Harry1986","html_url":"https://github.com/Harry1986","followers_url":"https://api.github.com/users/Harry1986/followers","following_url":"https://api.github.com/users/Harry1986/following{/other_user}","gists_url":"https://api.github.com/users/Harry1986/gists{/gist_id}","starred_url":"https://api.github.com/users/Harry1986/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harry1986/subscriptions","organizations_url":"https://api.github.com/users/Harry1986/orgs","repos_url":"https://api.github.com/users/Harry1986/repos","events_url":"https://api.github.com/users/Harry1986/events{/privacy}","received_events_url":"https://api.github.com/users/Harry1986/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T00:11:16Z","updated_at":"2015-09-25T00:11:16Z","body":"Hi mrgswift, \r\n\r\nYou need to add a new paramater 'database' into your config/oauth2.php. The value should be connection name which you define in database.php (e.g: mysql_oauth2). \r\n\r\nHope it helps. "}}