Questions tagged [authentication-authorization]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
28 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
35 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
16 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 ...
-1
votes
0answers
12 views

Permission per cumulative criterias

On an intranet, users are employees working on various places (city) and various services (DG1, DG2, etc.) I have to create website areas (taxonomy) ans some of them must be readable only by users ...
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
18 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
12 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
25 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
44 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
0answers
15 views

User logout returns a 403 Error

I have a headless application in Drupal 8 I use as data provider. I am trying to log in and log out using user/login?_format=json and user/logout?_format=json. I followed the Drupal 8 documentation ...
0
votes
1answer
24 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
0answers
15 views

Confilct with 2 custom authentication providers for REST

I need a custom authentication provider using JWT library for authenticate some REST, but in this Drupal other people using other custom authentication similar to my provider. The problem: If i check ...
0
votes
1answer
28 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
50 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
26 views

Using Drupal authentication with clientless remote desktop

Is it possible to pass along authentication of a authenticated drupal user, to a clientless remote desktop gateway(HTML5), if that user exsit with same creds with gateway? Example, user logs into ...
0
votes
0answers
28 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
41 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 ...
0
votes
0answers
97 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
0answers
20 views

user_login_submit doesn't work when called in an inner function

We have a shared register function that multiple pieces of our app use. When registration is successful, we log the user in. But for some reason, when a user completes this project via browser in the ...
0
votes
1answer
27 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 ...
2
votes
0answers
156 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
25 views

simpleSAMLphp Authentication or simplesamlphp-module-drupalauth?

I followed How to Configure Single Sign On across Multiple Drupal 8 Platforms or Websites? I only configured a service provider with simpleSAMLphp and I have some difficulties to make an identity ...
0
votes
0answers
24 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
48 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
157 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
36 views

How to use oauth2 authorization in feeds importer?

I did it the postman like the following steps In the authorization tab, I selected OAuth 2.0 as Type. Then clicked on get new access token. I selected grant type as Client Credentials. Added access ...
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
145 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
140 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
35 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
1answer
438 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
42 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
116 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
302 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
55 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
62 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 ...
0
votes
0answers
44 views

How do I find the lost administrator login credentials?

How do I find the lost administrator login credentials? I have deployed locally an old Drupal 7 website and I can't find the administrator login credentials since Windows had crashed 3 years ago.
0
votes
0answers
85 views

drupal_http_request as authenticated user during cron

I have a rule set up that runs during cron. Part of that rule is an action that is supposed to save a PDF (via Entity Print which only authenticated users can access) to my server. It works fine when ...
0
votes
0answers
152 views

What do I need to do to successfully enable Facebook login for my site?

I'm trying to setup Facebook login integration for my Drupal site using the HybridAuth Social login module. It is not working with "Use Strict Mode for Redirect URIs" enabled and I am failing to ...
0
votes
1answer
2k views

User login through JSON request returning HTML instead of JSON

I am using Drupal 8.6.4 http://example.org/user/login?_format=json When I try to submit a post request, it returns HTML page instead of JSON response. I am sending headers: Content-Type: ...
0
votes
1answer
54 views

Trouble redirecting users after implementing LDAP

We had a feature on our site where we redirected users with certain roles to a particular landing page upon logging in. In a custom module, we implemented hook_user_login(\Drupal\user\UserInterface $...
1
vote
0answers
71 views

Google OAuth 2 authentication in custom module

I've created a custom module to use the Google MyBusiness (GMB) API to get reviews etc for a specified location. The issue I am having at the moment is authenticating. All the examples I have read ...
0
votes
1answer
211 views

Pantheon Live / Test / Dev Login Issue

I have recently inherited a Drupal 7 site on Pantheon.io. None of the admin logins that work flawlessly in the Live environment work in either Test or Dev. I have pushed/pulled code and DB between the ...
0
votes
2answers
321 views

“Missing required paramter” with all Social Auth providers

The problem: I've just installed social_auth_google, social_auth_twitter and social_auth_linkedin modules. All the modules are configured (Client ID, Client Secret, and other similar fileds). The ...
0
votes
0answers
120 views

OAUTH2 REST API error: You must set the encryption key

After getting the token and when I call the rest API I got this error. User deprecated function: You must set the encryption key going forward to improve the security of this library - see this ...
0
votes
1answer
571 views

Drupal8 Oaut2 add a grant type “password” to client

I work on Drupal8 project and created Rest API, everything works fine until I want to add Oauth2 when I try to get a token I got an invalid grant type error. This is the error code: { "error": "...
2
votes
0answers
112 views

Simple OAuth Role assignment within a Scope

I have a web app that has multiple scopes under a single OAuth consumer. I want the user's Drupal role to be used when logging in. In simple OAuth, I have created 1 consumer that has 2 scopes: ...
0
votes
2answers
892 views

Cannot log in as Drupal admin

I have installed phpMyAdmin. I can see the admin user (uid=1) in each of the two databases I have reset the password using; update users_field_data set pass=Password("new_password"); I can see ...
6
votes
3answers
675 views

Simple OAuth + JSONapi response when token is expired - Decoupled

We're using the 'Simple OAuth' and 'jsonapi' modules for the front end authentication in Angular of our decoupled Drupal project. We've noticed that when the user credentials are correct but the ...

1
2 3 4 5
7