Questions tagged [authentication-authorization]

Use it for the user authentication/authorization on Drupal core or third-party modules.

Filter by
Sorted by
Tagged with
0
votes
1answer
20 views

Success with cookie, fails with JWT: RuntimeException: Failed to start the session because headers have already been sent

My Controller is working with cookie auth but failing with JWT. This Controller is supposed to flag an entity for the logged-in user. If I am using cookie auth, there are no errors and everything ...
0
votes
1answer
15 views

How do I allow only username for password reset form?

By default the password reset module allows 'Username OR E-mail'. I am using a module which allows multiple user accounts with a same email address (but usernames are unique and auto-generated), so ...
0
votes
1answer
22 views

OAuth2 Server sending 'null' as the 'sub' parameter instead of User Id

When using OAuth2 Server module to authorize with users, I am not receiving the correct "sub" parameter in the response from the server. I get all the other fields such as email, ...
0
votes
0answers
14 views

How can I set FirstName and LastName fields in Social Auth module

I use social auth module forregister and login users. I'm add fields 'field_first_name', 'field_last_name' in user profile. How can I set FirstName and LastName fields in user profile from social ...
1
vote
0answers
12 views

How to get a JWT token when not logged in

If I am logged in (have a session cookie) and make a GET request to /jwt/token, then I get a JWT token. How do I get the token if I am not logged in? This article by Preston So states: As a logged-...
-1
votes
1answer
61 views

Query user_field_data in Drupal

I need to query the user_field_data table to see if a user exists. Through a query string, I pass to a php script that is on the server username and password in clear text. This script connects to the ...
1
vote
1answer
65 views

Decoupled login: How do I get the session cookie via JavaScript?

In the Medium app, if you go to the settings tab, you can change some of the settings inside the app. But, if you try to change your email notification settings, it opens up a web browser inside the ...
4
votes
2answers
172 views

How to implement stateless authentication

I'm having a big problem with Drupal 8, I want Drupal to trust a downstream reverse proxy that performs authentication against a third party provider, then passes a JWT in a X_ID_TOKEN header. As I ...
0
votes
0answers
3 views

SimpleOAuth unable to find Client Id when attempting to Authorize

I'm trying to use SimpleOAuth to allow another service to login using my drupal user. I went ahead and created a client and all that fun stuff, but when the other site tries to authorize the current ...
0
votes
0answers
38 views

After installing and configuring simplesamlphp_auth module gives Error on clearing cache

I installed simplesamlphp_auth(8x-3.2) module with drupal (9.1.x). SimpleSAMLphp (1.18.8) is configured correctly. saml authentication works fine, but while clearing cache i am getting the below error....
0
votes
1answer
64 views

Programmatically log in a user

I am trying to authenticate users as below. I don't get any error, but it doesn't log in users. autoLogin.php is located in the root folder. Visiting http://example.com/drupal8/autoLogin.php shows me ...
0
votes
1answer
27 views

I cannot sign into my drupal site. The login page just refreshes and there are no error messages

I cannot login into any account from the login page. I can get to the admin page by doing drush user-login but if I log out of admin and try logging in again, the login page just refreshes and I do ...
0
votes
0answers
46 views

Getting empty CookieJar when using cookie authentication with Python

I have a problem to acquire cookie through cookie authentication for RESTful in Drupal 8. In the beginning, I enabled the Basic Authentication module, but unfortunately, it does not work with my ...
0
votes
0answers
46 views

Can't get React app to use Auth0 to login

We want to use Auth0 for login for a React app with headless Drupal: We have to support phone number +OTP as well as email+password, and we want to have some users be able to login to other D8/9 sites ...
0
votes
1answer
70 views

JSON:API authorization

I'm at the early stages of trying to figure out the Drupal JSON API and can't figure out what's causing the following errors. Some resources have been omitted because of insufficient authorization. ...
0
votes
1answer
174 views

Issues trying to understand and debug simplesamlphp error

Simplesamlphp used to work on the site. Something changed and now it does not. The IDP remote config has been verified, including the cert The SP cert and pem in the simplesamlphp/config folder have ...
0
votes
1answer
70 views

How do I restrict GraphQL access with Basic Auth?

According to this Gitbook (near the bottom), its possible to require GraphQL query authentication with Drupal Core's Basic Auth module. This allows GraphQL to authenticate against a user stored in the ...
2
votes
1answer
43 views

Using an authentication provider to keep a user permanently logged in eventually causes session problems

Because I got fed up of having to log in to my local development sites every however long, I tried making a simple custom module that just has an Authentication Provider service that always returns ...
1
vote
1answer
38 views

Why doesn't the authentication work?

I am using Rest web service . I CREATED a view called ART and specified its path (/viewpath) and I set the http baisc authentication within that view's structure such that the results will be ...
0
votes
1answer
64 views

How to sign-in a user based on custom HTTP headers in Drupal 8?

I would like to sign-in a user based on some custom headers in the HTTP Request. Let's say i have an administrator account in Drupal with the login "admin". If i send a request to Drupal ...
-1
votes
1answer
71 views

What is correct api key name in headers

I'm using this module https://www.drupal.org/project/services_api_key_auth, it states that you can either put the api_key in query string or inside header. In query it works like this domain.com/api/...
0
votes
0answers
38 views

Where do I check whether the logged-in user is administrator, moderator, or just an authenticated user?

I have two separate login pages for users and administrators: /users/login and backend/login. I have created a new function in my custom theme. function customtheme_theme() { $items = array(); ...
0
votes
0answers
18 views

Authenticated user cannot view custom content type pages

I have a new Drupal 8 website which only two of us have login access to. I'm the administrator and the other person is an authenticated user. I've set the permissions so that authenticated users can ...
0
votes
1answer
28 views

Delegate user administration to a limited set of users

We are currently using the excellent domain module (allows segmenting users by domain) in and the user_import module (allows uploading users via CSV) in Drupal 7. We've got a new requirement where we ...
0
votes
0answers
28 views

REST login issue with react application

We are trying to integrate the drupal8 login REST api in react. And we are facing the below issue. Status code 500: Service unavailable. And When we checked the error log, we are seeing the following ...
0
votes
1answer
31 views

REST API OAuth Authorization and Authentication

I am very much confused about the way OAuth authorization and authentication works in Drupal 8/9. Let me put my points first, please correct me if I am wrong. Authorization is when an entity proves a ...
0
votes
1answer
63 views

Generate new bearer token with simple_oauth programmatically?

I have a custom service and in the custom service, I want to generate a new Bearer token for the current user ( it's logged in) with simple_oauth module. in its documentation is has not mentioned how ...
0
votes
0answers
48 views

How can I redirect to a particular page or front page after login via a social networking site?

In my Drupal 8 site, In the comment section, I have one button ("Add new comment"). Clicking on it will open a login pop up and user will be redirected to the same page. For that, I added the ...
0
votes
1answer
247 views

How to get user data/authenticate with bearer token - Simple OAuth - Decoupled

I am working on a single page application using NUXT and Drupal 8 as headless CMS. for user authentication token I am using Simple OAuth Drupal 8 module. Everything is working fine. I am getting the ...
0
votes
1answer
45 views

simplesamlphp_auth installation fails on Centos 8-server

I am trying to install simplesamlphp_auth to Centos 8/Drupal 8 server according the instructions on: https://www.drupal.org/docs/8/modules/apigee-developer-portal-kickstart/integrate-simplesamlphp- ...
0
votes
1answer
184 views

How do i verify users passwords from the hash in the database without drupal core logic

I oversee a proprietary CMS with a headless Drupal back-end. We use Drupal to authenticate users, manage permissions and roles, and store HTML for almost 13, 000 pages. As our needs have grown, our ...
0
votes
0answers
38 views

Reset password single login link no longer valid

In a Drupal 8 project, when trying to reset password, the single login link is successfully sent to the entered email address but when clicking that link it always print the following message event ...
-1
votes
1answer
51 views

Locked out of my locally hosted Drupal site [duplicate]

I am running a local distribution of Drupal "commons" using Acquia Dev Desktop on a mac and somehow got locked out of my site. I saved my login info and am almost sure it's correct, but I'm still ...
1
vote
0answers
208 views

cant read current user in middleware

i am relatively new to drupal . thus i am trying to make an sso system work . i have this parent domain "domain.com" and the drupal site is running on sub.domain.com  . i can read the cookies and all ....
0
votes
1answer
28 views

How do I construct an authenticated HTTP request in Postman?

I have Drupal 7 installed locally on my computer with the domain set to http://drupal.local. I am trying to prepare an external script in PHP or Python (or even in pure Bash using curl, if it does ...
3
votes
0answers
176 views

How can I convert oauth2_token.value back to a Bearer token in simple_oauth?

I'm working on a headless Drupal 8 API that offers direct login links via email. For users who forgot their passwords or were invited but have never logged in, it's safe to just reset their password. ...
0
votes
0answers
28 views

Basic Authentication for migrate plus - unable to authenticate

The XML feed I was using recently updated to basic authentication. I updated my YML configuration with the basic authentication plugin as follows, but nothing seems to work, also there are no errors. ...
0
votes
1answer
307 views

How can I set up Protected Pages so users only have to log in once?

I'm using the Protected Pages module to make an area of the website - which is about 13 pages - password protected. The problem is that users have to enter the password to view every page rather than ...
1
vote
1answer
205 views

Problem with OAuth2 refresh token

I have the following problem with the simple_oauth module. I can get the initial jwt token with a POST request to /oauth/token with the following form data: username: user password: password ...
0
votes
0answers
58 views

No AJAX when user is logged in?

I am developing an e-commerce site for one of our customers for the first time with drupal. It is going pretty good so far but there is a weird misbehavior where I have no idea on how to handle it in ...
3
votes
1answer
246 views

Using OAuth2 on non-REST endpoints

I have a custom module which includes a ControllerBase. The controller has a content() function that returns a JsonResponse(). The code for this function returns a complete list of a certain entity ...
1
vote
1answer
329 views

Unable to run update.php or update modules from web interface

I would really like to be able to install module updates through the web interface or run update.php when needed without changing settings.php, but something seems to be broken in my setup because it ...
0
votes
0answers
18 views

2nd Opinion regarding data encryption

I'm managing a smaller project that uses Drupal 8. The site allows for users to register for an account. There is a simple feature which sends the user a welcome email along with their 'login ...
1
vote
0answers
70 views

Checking if user logged-in by external script, fails

With a script on an external webpage (same domain), I need to detect whether the user that's visiting the page is or not logged in. [EDIT] This occurs when the script is into a subfolder. If it's put ...
0
votes
2answers
704 views

Before login hook

Is there a Drupal 8 hook for pre-login? I would like to redirect the login information of a user on a web server by URL. I know there is hook_user_login(), but this one only looks called once the ...
0
votes
0answers
62 views

Migration with SOAP basic auth

I try to create a migration from a webservice but i can't set the authentication... In my YAML, i have this : source: plugin: url data_fetcher_plugin: http data_parser_plugin: soap ...
0
votes
1answer
156 views

Simple Oauth oauth/debug?_format=json Internal Server error

When i try to test the ooauth/debug?_format=json endpoint through Postman i get the internal server error and error code 403 forbidden. Even though i use a valid Authorization header with Bearer and ...
1
vote
1answer
488 views

REST login problem

I'm trying to log in to drupal8 via api rest using postman. POST: https://example.com/user/login?_format=json Content-type: application/json { "name": "admin", "pass": "password" } The problem is ...
0
votes
1answer
69 views

LDAP SSO does not authenticate user on homepage

I have configured ldap sso and it is working so far for all Url paths except for the homepage. I get authenticated on /user/login/sso and I get authenticated on /whatsoever but I don't get ...
0
votes
1answer
71 views

Custom Access check for module route

I'm working on module that should behave as API endpoint. I created Controller which handler POST & GET requests from external system, but I need to add user authentication so only authenticated ...

1
2 3 4 5
7