I am trying to use Session Joining and Deep Linking but it does not appear to be working as expected.
Using APEX 5.1.1.00.08 and the latest ORDS.
The application generates emails with URLs that take the user to a page in the application. The URLs contain an APEX Item and Value.
apex_util.prepare_url is used to generate a checksum.
There are three use cases:
1. User clicks on URL in email and already is already logged into the application.
This works. The user does not have to log in.
2. User clicks on URL in email and is not already logged into the application.
This doesn't work as expected. The user is prompted to log in but after logging in, they do not go to the page in the URL.
What I want to happen is the user is prompted to log in and they are then taken to the page specified in the URL.
3. User clicks on URL and is already logged into the application but it's a new session, meaning that the user has logged out and logged in since the email was sent.
This does not work. The following message is generated:
"The checksum computed on the request, clear cache, argument names, and argument values (P16_REQUEST_SEQ132741 [rHKKkvD02Sy1BTbCLBFpuw0TCtyC96RHsZPs7Cq8SyFqP0uU0qrFwzrJ5FZ01XwPSXFifpycYBhXyTeDPCbkbA]) did not match the checksum passed into the show procedure (SF6C-rVcRN0R-QFbOVv73m8RhbY_uA9dN16RkRd3RZWYbnvy_6u-cFzs3ClYJhVSn0h7emYUTSJAKKMUlnV67A). Note: End users get a different error message."
What I want to happen is the user is not prompted to log in and they are taken right to the page specified in the URL.
Here's the code that generates the URL and send the email:
DECLARE
s_request_url VARCHAR2(32767);
BEGIN
-- f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly
s_request_url :=
'https://' ||
v('F_HTTP_HOST')||
'/' ||
'ords' ||
'/' ||
v('F_DAD_NAME')||
'/' ||
apex_util.prepare_url(
p_url => apex_page.get_url
(
p_application => v('APP_ALIAS'),
p_page => 'REQUEST',
p_session => NULL,
p_request => NULL,
p_debug => 'YES',
p_clear_cache => NULL,
p_items => 'P16_REQUEST_SEQ',
p_values => v('P16_REQUEST_SEQ'),
p_printer_friendly => NULL,
p_trace => NULL
),
p_checksum_type => 'SESSION'
);
apex_debug.MESSAGE(
p_message => 's_request_url="' || s_request_url || '"',
p_max_length => 1000,
p_level => apex_debug.c_log_level_info,
p_force => FALSE
);
dar_application_pack.send_request_via_email_proc
(
pn_person_seq_in => :f_person_seq,
ps_role_cde_in => 'ANALYST',
pn_request_seq_in => :p16_request_seq,
ps_message_in => :p16_message_to_analyst,
ps_request_url_in => s_request_url,
ps_appl_title_in => :f_flow_name,
ps_appl_version_in => :appl_major_version || '.' || :f_flow_version,
pb_add_url_checksum_in => TRUE
);
END;