{"action":"created","issue":{"url":"https://api.github.com/repos/pantheon-systems/wp-saml-auth/issues/111","repository_url":"https://api.github.com/repos/pantheon-systems/wp-saml-auth","labels_url":"https://api.github.com/repos/pantheon-systems/wp-saml-auth/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/pantheon-systems/wp-saml-auth/issues/111/comments","events_url":"https://api.github.com/repos/pantheon-systems/wp-saml-auth/issues/111/events","html_url":"https://github.com/pantheon-systems/wp-saml-auth/issues/111","id":292951382,"number":111,"title":"Log in does not work when using wp-admin URL","user":{"login":"dealancer","id":600216,"avatar_url":"https://avatars0.githubusercontent.com/u/600216?v=4","gravatar_id":"","url":"https://api.github.com/users/dealancer","html_url":"https://github.com/dealancer","followers_url":"https://api.github.com/users/dealancer/followers","following_url":"https://api.github.com/users/dealancer/following{/other_user}","gists_url":"https://api.github.com/users/dealancer/gists{/gist_id}","starred_url":"https://api.github.com/users/dealancer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dealancer/subscriptions","organizations_url":"https://api.github.com/users/dealancer/orgs","repos_url":"https://api.github.com/users/dealancer/repos","events_url":"https://api.github.com/users/dealancer/events{/privacy}","received_events_url":"https://api.github.com/users/dealancer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars1.githubusercontent.com/u/36432?v=4","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"assignees":[{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars1.githubusercontent.com/u/36432?v=4","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-01-30T21:53:44Z","updated_at":"2018-02-08T17:55:51Z","closed_at":null,"author_association":"NONE","body":"This issue is similar to https://github.com/pantheon-systems/wp-saml-auth/issues/62.\r\n\r\nI am using WP SAML Auth 0.3.5 and simpleSAMLphp library. I have following configuration overrides:\r\n\r\n```\r\n  if ( 'simplesamlphp_autoload' === $option ) {\r\n    $value = ABSPATH . '/private/simplesamlphp/lib/_autoload.php';\r\n  }\r\n  if ( 'display_name_attribute' === $option ) {\r\n    $value = 'displayName';\r\n  }\r\n  if ( 'first_name_attribute' === $option ) {\r\n    $value = 'givenName';\r\n  }\r\n  if ( 'last_name_attribute' === $option ) {\r\n    $value = 'sn';\r\n  }\r\n  if ( 'permit_wp_login' === $option ) {\r\n    $value = false;\r\n  }\r\n  if ( 'get_user_by' === $option ) {\r\n    $value = 'login';\r\n  }\r\n```\r\n\r\nWhen `permit_wp_login` is turned off (`false`) following issue occurs.\r\n\r\nSteps to reproduce it:\r\n\r\n1. Go to `/wp-admin`\r\n2. Log in using SAML\r\n3. You are redirected to `https://<sitedomain>/wp-login.php?redirect_to=https%3A%2F%2F<sitedomain>%2Fwp-admin%2F&reauth=1` and following is shown:\r\n<img width=\"425\" alt=\"screen shot 2018-01-30 at 4 51 20 pm\" src=\"https://user-images.githubusercontent.com/600216/35593434-e646c946-05dd-11e8-8bb4-3b72aaa6369a.png\">\r\n4. When you click `Back to GU WordPress MVP` you are visiting the home page of the website and user does not seem to be logged in.\r\n\r\n\r\nIf you remove `&reauth=1` from the URL in the browser and hit enter. You are successfully logged in.\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pantheon-systems/wp-saml-auth/issues/comments/364194861","html_url":"https://github.com/pantheon-systems/wp-saml-auth/issues/111#issuecomment-364194861","issue_url":"https://api.github.com/repos/pantheon-systems/wp-saml-auth/issues/111","id":364194861,"user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars1.githubusercontent.com/u/36432?v=4","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T17:55:51Z","updated_at":"2018-02-08T17:55:51Z","author_association":"MEMBER","body":"Odd! I can't reproduce that.\r\n\r\nIs it possible for you to debug the [change I made](https://github.com/pantheon-systems/wp-saml-auth/pull/112/files#diff-6263dbcace135f6a661e978c815c253fR246) to see why it's not applied in your case?\r\n\r\nHere's an overview on what's going on:\r\n\r\n* A request to `/wp-admin/` hits the `auth_redirect()`: https://github.com/WordPress/WordPress/blob/a1eb261cd1202c918a3e84b45fdf61f516ff3104/wp-includes/pluggable.php#L1003\r\n* Shortly after, the `authenticate` filter is called which executes our `do_saml_authentication()` method: https://github.com/pantheon-systems/wp-saml-auth/blob/ebaa7a5d55b73f3af4d911861dcfcd5f27538e61/inc/class-wp-saml-auth.php#L202\r\n* When the provider is SimpleSAMLPHP, SimpleSAMLPHP's `requireAuth()` method is called: https://github.com/pantheon-systems/wp-saml-auth/blob/ebaa7a5d55b73f3af4d911861dcfcd5f27538e61/inc/class-wp-saml-auth.php#L244\r\n\r\nAlternatively, have you considered using the OneLogin bundled library? This is our preferred approach going forward"}}
{"actor":{"display_login":"danielbachhuber"}}