It seems like you are encountering an issue with the initial smart card logon after a system reboot on macOS. This behavior might be related to the system's security policies or the order in which authentication mechanisms are initialized during the boot process.
Here are a few suggestions to help you debug and potentially resolve the issue:
Check System Log for Errors:
Review the system logs to see if there are any error messages related to smart card authentication during the initial logon. You can use the Console application or check the logs using the command line:
Look for any error messages or warnings that might provide insights into the problem.
Smart Card Initialization Timing:
Ensure that your smart card initialization process is properly timed during the system boot. There may be dependencies or delays in the initialization of smart card services that are causing the issue. You may need to delay your smart card initialization until after other necessary system services are up and running.
Debugging with sc_auth Tool:
macOS includes a tool called sc_auth that can be useful for debugging smart card issues. You can use it to trigger smart card authentication manually and observe any error messages. For example:
The --debug option will provide more detailed output. You can use this tool to simulate the authentication process and see if it reveals any issues.
Consider Credential Caching:
macOS might be caching credentials for a certain period after the initial login, which could explain why the smart card works after a password login. Check if there are any caching mechanisms in place and if adjusting their settings helps.
Review Security Policies:
Ensure that your smart card logon extension adheres to macOS security policies. The security policies might have specific requirements or restrictions that affect the behavior of authentication mechanisms.